Skip to content

Commit 309104a

Browse files
author
Tyler Deemer
committed
Merge branch 'master' into ViewCSPInWebview
2 parents 7429c74 + c07000b commit 309104a

15 files changed

+377
-56
lines changed

.github/SUPPORT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Commercial Support from CaretDev Corp
22
You will get
33
* Faster issue solving
4-
* Priority in fatures reqeuests
4+
* Priority in feature requests
55
* On-line chat with us
66

77
More [details](https://caretdev.com/visual-studio-code-objectscript-enterprise/).

.github/workflows/main.yml

Lines changed: 93 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
name: CI
22

3-
on: [push,release]
4-
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths-ignore:
8+
- '*.md'
9+
- '**/*.md'
10+
pull_request:
11+
branches:
12+
- master
13+
release:
14+
types:
15+
- created
516
jobs:
617
build:
718
runs-on: ${{ matrix.os }}
@@ -17,16 +28,21 @@ jobs:
1728
run: |
1829
set -x
1930
VERSION=$(jq -r '.version' package.json | cut -d- -f1)
31+
[ $GITHUB_EVENT_NAME == 'release' ] && VERSION=${{ github.event.release.tag_name }} && VERSION=${VERSION/v/}
2032
CHANGELOG=$(cat CHANGELOG.md | sed -n "/## \[${VERSION}\]/,/## /p" | sed '/^$/d;1d;$d')
2133
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
2234
echo ::set-output name=changelog::$CHANGELOG
23-
VERSION+=-beta
2435
git tag -l | cat
25-
VERSION+=.$(($(git tag -l "v$VERSION.*" 2>/dev/null | tail -1 | cut -d. -f4)+1))
36+
[ $GITHUB_EVENT_NAME == 'push' ] && VERSION+=-beta && VERSION+=.$(($(git tag -l "v$VERSION.*" | sort -nt. -k4 2>/dev/null | tail -1 | cut -d. -f4)+1))
37+
[ $GITHUB_EVENT_NAME == 'pull_request' ] && VERSION+=-dev
2638
echo ::set-output name=version::$VERSION
27-
echo ::set-output name=name::$(jq -r '.name' package.json)-$VERSION
39+
NAME=$(jq -r '.name' package.json)-$VERSION
40+
echo ::set-output name=name::$NAME
2841
tmp=$(mktemp)
2942
jq --arg version "$VERSION" '.version = $version' package.json > "$tmp" && mv "$tmp" package.json
43+
mkdir dist
44+
echo $VERSION > ./dist/.version
45+
echo $NAME > ./dist/.name
3046
- name: Use Node.js
3147
uses: actions/setup-node@master
3248
with:
@@ -40,8 +56,28 @@ jobs:
4056
- name: Build package
4157
if: runner.os == 'Linux'
4258
run: |
43-
mkdir dist
44-
./node_modules/.bin/vsce package -o ./dist/vscode-objectscript.vsix
59+
./node_modules/.bin/vsce package -o ./dist/package.vsix
60+
- uses: actions/upload-artifact@master
61+
if: runner.os == 'Linux'
62+
with:
63+
name: vsix
64+
path: ./dist/
65+
beta:
66+
if: (github.event_name == 'push')
67+
runs-on: ubuntu-latest
68+
needs: build
69+
steps:
70+
- uses: actions/download-artifact@master
71+
with:
72+
name: vsix
73+
path: ./dist/
74+
- name: Set an output
75+
id: set-version
76+
if: runner.os == 'Linux'
77+
run: |
78+
set -x
79+
echo ::set-output name=version::`cat ./dist/.version`
80+
echo ::set-output name=name::`cat ./dist/.name`
4581
- name: Create Release
4682
id: create_release
4783
uses: actions/create-release@master
@@ -51,8 +87,7 @@ jobs:
5187
with:
5288
tag_name: v${{ steps.set-version.outputs.version }}
5389
release_name: v${{ steps.set-version.outputs.version }}
54-
draft: false
55-
prerelease: true
90+
prerelease: ${{ github.event_name != 'release' }}
5691
body: |
5792
Changes in this release
5893
${{ steps.set-version.outputs.changelog }}
@@ -64,6 +99,54 @@ jobs:
6499
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65100
with:
66101
upload_url: ${{ steps.create_release.outputs.upload_url }}
67-
asset_path: ./dist/vscode-objectscript.vsix
102+
asset_path: ./dist/package.vsix
103+
asset_name: ${{ steps.set-version.outputs.name }}.vsix
104+
asset_content_type: application/zip
105+
publish:
106+
if: github.event_name == 'release'
107+
runs-on: ubuntu-latest
108+
needs: build
109+
steps:
110+
- uses: actions/checkout@v2
111+
with:
112+
ref: master
113+
- uses: actions/download-artifact@master
114+
with:
115+
name: vsix
116+
path: ./dist/
117+
- name: Use Node.js
118+
uses: actions/setup-node@master
119+
with:
120+
node-version: 12.x
121+
- name: Prepare build
122+
id: set-version
123+
run: |
124+
VERSION=`cat ./dist/.version`
125+
echo ::set-output name=name::`cat ./dist/.name`
126+
tmp=$(mktemp)
127+
git config --global user.name 'ProjectBot'
128+
git config --global user.email '[email protected]'
129+
jq --arg version "${VERSION}-SNAPSHOT" '.version = $version' package.json > "$tmp" && mv "$tmp" package.json
130+
git add package.json
131+
git commit -m 'auto bump version with release'
132+
jq --arg version "$VERSION" '.version = $version' package.json > "$tmp" && mv "$tmp" package.json
133+
jq '.enableProposedApi = false' package.json > "$tmp" && mv "$tmp" package.json
134+
npm install
135+
npm i -g vsce ovsx
136+
git push
137+
- name: Upload Release Asset
138+
id: upload-release-asset
139+
uses: actions/upload-release-asset@master
140+
if: runner.os == 'Linux'
141+
env:
142+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
143+
with:
144+
upload_url: ${{ github.event.release.upload_url }}
145+
asset_path: ./dist/package.vsix
68146
asset_name: ${{ steps.set-version.outputs.name }}.vsix
69147
asset_content_type: application/zip
148+
- name: Publish to Marketplaces
149+
run: |
150+
vsce publish -p ${{ secrets.VSCE_TOKEN }}
151+
ovsx publish --pat ${{ secrets.OVSX_TOKEN }}
152+

CODE_OF_CONDUCT.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
2+
# Contributor Covenant Code of Conduct
3+
4+
## Our Pledge
5+
6+
We as members, contributors, and leaders pledge to make participation in our
7+
community a harassment-free experience for everyone, regardless of age, body
8+
size, visible or invisible disability, ethnicity, sex characteristics, gender
9+
identity and expression, level of experience, education, socio-economic status,
10+
nationality, personal appearance, race, religion, or sexual identity
11+
and orientation.
12+
13+
We pledge to act and interact in ways that contribute to an open, welcoming,
14+
diverse, inclusive, and healthy community.
15+
16+
## Our Standards
17+
18+
Examples of behavior that contributes to a positive environment for our
19+
community include:
20+
21+
* Demonstrating empathy and kindness toward other people
22+
* Being respectful of differing opinions, viewpoints, and experiences
23+
* Giving and gracefully accepting constructive feedback
24+
* Accepting responsibility and apologizing to those affected by our mistakes,
25+
and learning from the experience
26+
* Focusing on what is best not just for us as individuals, but for the
27+
overall community
28+
29+
Examples of unacceptable behavior include:
30+
31+
* The use of sexualized language or imagery, and sexual attention or
32+
advances of any kind
33+
* Trolling, insulting or derogatory comments, and personal or political attacks
34+
* Public or private harassment
35+
* Publishing others' private information, such as a physical or email
36+
address, without their explicit permission
37+
* Other conduct which could reasonably be considered inappropriate in a
38+
professional setting
39+
40+
## Enforcement Responsibilities
41+
42+
Community leaders are responsible for clarifying and enforcing our standards of
43+
acceptable behavior and will take appropriate and fair corrective action in
44+
response to any behavior that they deem inappropriate, threatening, offensive,
45+
or harmful.
46+
47+
Community leaders have the right and responsibility to remove, edit, or reject
48+
comments, commits, code, wiki edits, issues, and other contributions that are
49+
not aligned to this Code of Conduct, and will communicate reasons for moderation
50+
decisions when appropriate.
51+
52+
## Scope
53+
54+
This Code of Conduct applies within all community spaces, and also applies when
55+
an individual is officially representing the community in public spaces.
56+
Examples of representing our community include using an official e-mail address,
57+
posting via an official social media account, or acting as an appointed
58+
representative at an online or offline event.
59+
60+
## Enforcement
61+
62+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
63+
reported to the community leaders responsible for enforcement at
64+
65+
66+
All complaints will be reviewed and investigated promptly and fairly.
67+
68+
All community leaders are obligated to respect the privacy and security of the
69+
reporter of any incident.
70+
71+
## Enforcement Guidelines
72+
73+
Community leaders will follow these Community Impact Guidelines in determining
74+
the consequences for any action they deem in violation of this Code of Conduct:
75+
76+
### 1. Correction
77+
78+
**Community Impact**: Use of inappropriate language or other behavior deemed
79+
unprofessional or unwelcome in the community.
80+
81+
**Consequence**: A private, written warning from community leaders, providing
82+
clarity around the nature of the violation and an explanation of why the
83+
behavior was inappropriate. A public apology may be requested.
84+
85+
### 2. Warning
86+
87+
**Community Impact**: A violation through a single incident or series
88+
of actions.
89+
90+
**Consequence**: A warning with consequences for continued behavior. No
91+
interaction with the people involved, including unsolicited interaction with
92+
those enforcing the Code of Conduct, for a specified period of time. This
93+
includes avoiding interactions in community spaces as well as external channels
94+
like social media. Violating these terms may lead to a temporary or
95+
permanent ban.
96+
97+
### 3. Temporary Ban
98+
99+
**Community Impact**: A serious violation of community standards, including
100+
sustained inappropriate behavior.
101+
102+
**Consequence**: A temporary ban from any sort of interaction or public
103+
communication with the community for a specified period of time. No public or
104+
private interaction with the people involved, including unsolicited interaction
105+
with those enforcing the Code of Conduct, is allowed during this period.
106+
Violating these terms may lead to a permanent ban.
107+
108+
### 4. Permanent Ban
109+
110+
**Community Impact**: Demonstrating a pattern of violation of community
111+
standards, including sustained inappropriate behavior, harassment of an
112+
individual, or aggression toward or disparagement of classes of individuals.
113+
114+
**Consequence**: A permanent ban from any sort of public interaction within
115+
the community.
116+
117+
## Attribution
118+
119+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
120+
version 2.0, available at
121+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
122+
123+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
124+
enforcement ladder](https://github.com/mozilla/diversity).
125+
126+
homepage: <https://www.contributor-covenant.org>.
127+
128+
For answers to common questions about this code of conduct, see the FAQ at
129+
<https://www.contributor-covenant.org/faq>. Translations are available at
130+
<https://www.contributor-covenant.org/translations>.
131+

README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[![Known Vulnerabilities](https://snyk.io/test/github/intersystems-community/vscode-objectscript/badge.svg)](https://snyk.io/test/github/intersystems-community/vscode-objectscript)
2-
[![Gitter](https://badges.gitter.im/intersystems-community/vscode-objectscript.svg)](https://gitter.im/intersystems-community/vscode-objectscript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
2+
![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/daimor.vscode-objectscript.svg)
33
[![](https://img.shields.io/visual-studio-marketplace/i/daimor.vscode-objectscript.svg)](https://marketplace.visualstudio.com/items?itemName=daimor.vscode-objectscript)
44

55
[![](https://img.shields.io/badge/InterSystems-IRIS-blue.svg)](https://www.intersystems.com/products/intersystems-iris/)
@@ -10,16 +10,20 @@
1010

1111
[InterSystems](http://www.intersystems.com/our-products/) ObjectScript language support for Visual Studio Code.
1212

13+
1314
[CaretDev](https://caretdev.com/#products) provides commercial support services. [Request a Quote](https://caretdev.com/contact-us/).
1415

16+
On-line course from CaretDev - [Developing with VSCode ObjectScript – Easy Start](https://caretdev.com/courses/).
17+
18+
1519
## Features
1620

1721
- InterSystems ObjectScript code highlighting support.
1822
![example](https://raw.githubusercontent.com/intersystems-community/vscode-objectscript/master/images/screenshot.png)
1923
- Debugging ObjectScript code
20-
- Intellisense support for commands, system functions, class members
24+
- Intellisense support for commands, system functions, and class members.
2125
- Export existing sources to the working directory: press Cmd/Ctrl+Shift+P, type 'ObjectScript', press Enter.
22-
- Save and compile a class: press Ctrl+F7 (⌘+F7) or select "ObjectScript: Save and compile" from Cmd/Ctrl+Shift+P menu.
26+
- Save and compile a class: press <kbd>Ctrl</kbd>+<kbd>F7</kbd> (<kbd>⌘</kbd>+<kbd>F7</kbd>) or select "ObjectScript: Save and compile" from <kbd>Cmd</kbd>/<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> menu.
2327
- Server Explorer with possibility to export items![ServerExplorer](https://raw.githubusercontent.com/intersystems-community/vscode-objectscript/master/images/explorer.png)
2428
- Edit directly on server
2529

@@ -33,7 +37,7 @@ Or install from ObjectScript extension page on [Visual Studio Marketplace](https
3337

3438
## Configure connection
3539

36-
To be able to use many plugin features, you need to configure the connection to Caché server first. You can create or edit existing `.vscode/settings.json` file. So, your settings file may somethiing like this.
40+
To be able to use many plugin features, you need to configure the connection to Caché/IRIS server first. You can create or edit existing `.vscode/settings.json` file. So, your settings file may look something like this.
3741
```JSON
3842
"objectscript.conn": {
3943
"active": true,
@@ -47,17 +51,17 @@ To be able to use many plugin features, you need to configure the connection to
4751
}
4852
```
4953

50-
Or you can edit it through settings editor. Which you can open from menu *Code* > *Preferences* > *Settings* for macOS or *File* > *Preferences* > *Settings* for Windows, search for "workspace settings" through Command Palette [⌘⇧P/Ctrl+Shift+P] or by shortcut [⌘,/Ctrl+,].
54+
Or you can edit it through settings editor. Which you can open from menu *Code* > *Preferences* > *Settings* for macOS or *File* > *Preferences* > *Settings* for Windows, search for "workspace settings" through Command Palette [<kbd>⌘⇧P</kbd>/<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>] or by shortcut [<kbd>⌘</kbd>+<kbd>,</kbd>/<kbd>Ctrl</kbd>+<kbd>,</kbd>].
5155

5256
- Find a 'objectscript', do not forget to set `active` to `true`
53-
`port` should follow to web port of instance (usually by default, 52773 for Caché/Ensemble, 52773 for IRIS) ![Settings UI](https://raw.githubusercontent.com/intersystems-community/vscode-objectscript/master/images/settings.png)
57+
`port` should follow to web port of instance (usually by default, `57772` for Caché/Ensemble, `52773` for IRIS) ![Settings UI](https://raw.githubusercontent.com/intersystems-community/vscode-objectscript/master/images/settings.png)
5458
- Change settings according to your Caché/IRIS instance
5559
- You will see related output in "Output" while switched to "ObjectScript" channel (right drop-down menu on top of the output window)
5660

5761
## Notes
5862

59-
For Caché/IRIS instance with maximum security level, add '%Development' role for '/api/atelier/' web-application ( [More](https://community.intersystems.com/post/using-atelier-rest-api) )
60-
If you are getting 'ERROR #5540: SQLCODE: -99 Message: User xxx is not privileged for the operation' when you try to get/refresh class/routine/includes lists, grant a following SQL Procedure to your user on target namespace.
63+
For Caché/IRIS instance with maximum security level, add `%Development` role for `/api/atelier/` web-application ( [More](https://community.intersystems.com/post/using-atelier-rest-api) )
64+
If you are getting `ERROR #5540: SQLCODE: -99 Message: User xxx is not privileged for the operation` when you try to get/refresh class/routine/includes lists, grant a following SQL Procedure to your user on target namespace.
6165
```SQL
62-
grant execute on %Library.RoutineMgr_StudioOpenDialog to xxx
63-
```
66+
GRANT EXECUTE ON %Library.RoutineMgr_StudioOpenDialog TO xxx
67+
```

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
theme: jekyll-theme-minimal

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-objectscript",
33
"displayName": "InterSystems ObjectScript",
44
"description": "InterSystems ObjectScript language support for Visual Studio Code",
5-
"version": "0.8.4-SNAPSHOT",
5+
"version": "0.8.7-SNAPSHOT",
66
"icon": "images/logo.png",
77
"aiKey": "7047c4a1-fc13-43ea-a485-01a74ff0b2af",
88
"categories": [
@@ -442,7 +442,7 @@
442442
}
443443
],
444444
"configuration": {
445-
"title": "InterSystems ObjectScript Configuration",
445+
"title": "InterSystems ObjectScript",
446446
"type": "object",
447447
"properties": {
448448
"objectscript.conn": {

src/extension.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import { ObjectScriptExplorerProvider } from "./explorer/explorer";
4848
import { WorkspaceNode } from "./explorer/models/workspaceNode";
4949
import { FileSystemProvider } from "./providers/FileSystemPovider/FileSystemProvider";
5050
import { WorkspaceSymbolProvider } from "./providers/WorkspaceSymbolProvider";
51-
import { currentWorkspaceFolder, outputChannel, portFromDockerCompose, terminalWithDocker } from "./utils";
51+
import { currentWorkspaceFolder, outputChannel, portFromDockerCompose, terminalWithDocker, notNull } from "./utils";
5252
import { ObjectScriptDiagnosticProvider } from "./providers/ObjectScriptDiagnosticProvider";
5353
import { DocumentRangeFormattingEditProvider } from "./providers/DocumentRangeFormattingEditProvider";
5454

@@ -287,12 +287,14 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
287287
diagnosticProvider.updateDiagnostics(vscode.window.activeTextEditor.document);
288288
}
289289

290-
const proposed = packageJson.enableProposedApi
291-
? [
292-
vscode.workspace.registerFileSearchProvider(FILESYSTEM_SCHEMA, new FileSearchProvider()),
293-
vscode.workspace.registerTextSearchProvider(FILESYSTEM_SCHEMA, new TextSearchProvider()),
294-
]
295-
: [];
290+
const proposed = [
291+
packageJson.enableProposedApi && typeof vscode.workspace.registerFileSearchProvider === "function"
292+
? vscode.workspace.registerFileSearchProvider(FILESYSTEM_SCHEMA, new FileSearchProvider())
293+
: null,
294+
packageJson.enableProposedApi && typeof vscode.workspace.registerTextSearchProvider === "function"
295+
? vscode.workspace.registerTextSearchProvider(FILESYSTEM_SCHEMA, new TextSearchProvider())
296+
: null,
297+
].filter(notNull);
296298

297299
context.subscriptions.push(
298300
reporter,

0 commit comments

Comments
 (0)