@daiyam/artifact-vsx-ts 0.9.2 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configs/.github/workflows/publish.yml +2 -2
- package/configs/package.json +5 -0
- package/configs/src/commands/hello.ts +1 -1
- package/configs/src/document-manager.ts +1 -1
- package/configs/src/extension.ts +1 -1
- package/configs/src/utils/logger.ts +6 -12
- package/configs/src/{settings.ts → utils/settings.ts} +4 -0
- package/package.json +2 -2
|
@@ -15,7 +15,7 @@ jobs:
|
|
|
15
15
|
runs-on: ubuntu-latest
|
|
16
16
|
steps:
|
|
17
17
|
- name: Checkout code
|
|
18
|
-
uses: actions/checkout@
|
|
18
|
+
uses: actions/checkout@v6
|
|
19
19
|
with:
|
|
20
20
|
fetch-depth: 0
|
|
21
21
|
|
|
@@ -60,7 +60,7 @@ jobs:
|
|
|
60
60
|
|
|
61
61
|
- name: Setup Node.js
|
|
62
62
|
if: env.RELEASE_EXISTS == 'no'
|
|
63
|
-
uses: actions/setup-node@
|
|
63
|
+
uses: actions/setup-node@v6
|
|
64
64
|
with:
|
|
65
65
|
node-version: 20
|
|
66
66
|
|
package/configs/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as vscode from 'vscode';
|
|
2
2
|
import { Disposable } from './utils/disposable.js';
|
|
3
|
-
import { CONFIG_KEY, getDebugChannel } from './settings.js';
|
|
3
|
+
import { CONFIG_KEY, getDebugChannel } from './utils/settings.js';
|
|
4
4
|
|
|
5
5
|
export class DocumentManager implements vscode.Disposable {
|
|
6
6
|
private readonly disposable: Disposable = new Disposable();
|
package/configs/src/extension.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import vscode from 'vscode';
|
|
2
2
|
import pkg from '../package.json';
|
|
3
3
|
import { DocumentManager } from './document-manager.js';
|
|
4
|
-
import { CONFIG_KEY, setupSettings } from './settings.js';
|
|
4
|
+
import { CONFIG_KEY, setupSettings } from './utils/settings.js';
|
|
5
5
|
import { hello } from './commands/hello.js';
|
|
6
6
|
|
|
7
7
|
const VERSION_KEY = 'version';
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { inspect } from 'node:util';
|
|
2
2
|
import { isPrimitive } from '@zokugun/is-it-type';
|
|
3
3
|
import vscode, { window } from 'vscode';
|
|
4
|
-
import { CONFIG_KEY } from '
|
|
4
|
+
import { CONFIG_KEY, EXTENSION_NAME } from './settings.js';
|
|
5
5
|
|
|
6
6
|
let $channel: vscode.OutputChannel | null = null;
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
9
9
|
export const Logger = {
|
|
10
10
|
debug(...args: unknown[]): void {
|
|
11
|
-
|
|
12
|
-
$channel.appendLine(`[debug] ${args.map(toString).join(' ')}`);
|
|
13
|
-
}
|
|
11
|
+
$channel?.appendLine(`[debug] ${args.map(toString).join(' ')}`);
|
|
14
12
|
},
|
|
15
13
|
error(...args: unknown[]): void {
|
|
16
14
|
const config = vscode.workspace.getConfiguration(CONFIG_KEY);
|
|
@@ -19,26 +17,22 @@ export const Logger = {
|
|
|
19
17
|
if(Boolean($channel) || showErrorAlert) {
|
|
20
18
|
const output = args.map(toString).join(' ');
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
$channel.appendLine(`[error] ${output}`);
|
|
24
|
-
}
|
|
20
|
+
$channel?.appendLine(`[error] ${output}`);
|
|
25
21
|
|
|
26
22
|
if(showErrorAlert) {
|
|
27
|
-
void window.showErrorMessage(
|
|
23
|
+
void window.showErrorMessage(`${EXTENSION_NAME}: ${output}`);
|
|
28
24
|
}
|
|
29
25
|
}
|
|
30
26
|
},
|
|
31
27
|
info(...args: unknown[]): void {
|
|
32
|
-
|
|
33
|
-
$channel.appendLine(`[info] ${args.map(toString).join(' ')}`);
|
|
34
|
-
}
|
|
28
|
+
$channel?.appendLine(`[info] ${args.map(toString).join(' ')}`);
|
|
35
29
|
},
|
|
36
30
|
setup(show: boolean = false): void {
|
|
37
31
|
const config = vscode.workspace.getConfiguration(CONFIG_KEY);
|
|
38
32
|
const debug = config.get<boolean>('debug') ?? false;
|
|
39
33
|
|
|
40
34
|
if(debug) {
|
|
41
|
-
$channel ||= vscode.window.createOutputChannel(
|
|
35
|
+
$channel ||= vscode.window.createOutputChannel(EXTENSION_NAME);
|
|
42
36
|
}
|
|
43
37
|
|
|
44
38
|
if(show) {
|
|
@@ -15,6 +15,10 @@ export let WORKSPACE_STORAGE: string | undefined;
|
|
|
15
15
|
|
|
16
16
|
let $context: vscode.ExtensionContext | null = null;
|
|
17
17
|
|
|
18
|
+
export function getContext(): vscode.ExtensionContext {
|
|
19
|
+
return $context!;
|
|
20
|
+
}
|
|
21
|
+
|
|
18
22
|
export async function setupSettings(context: vscode.ExtensionContext): Promise<Result<void, string>> {
|
|
19
23
|
EXTENSION_NAME = context.extension.packageJSON.displayName as string;
|
|
20
24
|
EXTENSION_ID = context.extension.id;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daiyam/artifact-vsx-ts",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "The configuration to create Visual Studio extensions and publish them on Visual Studio Marketplace and Open VSX Registry.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Baptiste Augrain",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"project-template",
|
|
32
32
|
"scaffold"
|
|
33
33
|
],
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "87e81e40835a9965ef4b3bce2ae30449a1e9e8e9"
|
|
35
35
|
}
|