@neurodevs/meta-node 0.14.3 → 0.14.5
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/build/__tests__/AbstractAutomoduleTest.js +6 -5
- package/build/__tests__/AbstractAutomoduleTest.js.map +1 -1
- package/build/__tests__/AbstractPackageTest.js +6 -38
- package/build/__tests__/AbstractPackageTest.js.map +1 -1
- package/build/__tests__/impl/GitAutocloner.test.js +5 -4
- package/build/__tests__/impl/GitAutocloner.test.js.map +1 -1
- package/build/__tests__/impl/ImplAutomodule.test.js +3 -2
- package/build/__tests__/impl/ImplAutomodule.test.js.map +1 -1
- package/build/__tests__/impl/NpmAutopackage.test.js +15 -14
- package/build/__tests__/impl/NpmAutopackage.test.js.map +1 -1
- package/build/__tests__/impl/TypescriptClassSnippetSuite.test.js +42 -42
- package/build/__tests__/impl/UiAutomodule.test.js +2 -1
- package/build/__tests__/impl/UiAutomodule.test.js.map +1 -1
- package/build/__tests__/impl/VscodeSnippetKeybinder.test.js +8 -7
- package/build/__tests__/impl/VscodeSnippetKeybinder.test.js.map +1 -1
- package/build/functions/expandHomeDir.js.map +1 -0
- package/build/impl/TypescriptClassSnippetSuite.js +43 -43
- package/build/impl/TypescriptClassSnippetSuite.js.map +1 -1
- package/build/impl/VscodeSnippetKeybinder.js +2 -2
- package/build/impl/VscodeSnippetKeybinder.js.map +1 -1
- package/build/scripts/runAutopackage.js +1 -1
- package/build/scripts/runAutopackage.js.map +1 -1
- package/build/scripts/runImplAutomodule.js +1 -1
- package/build/scripts/runImplAutomodule.js.map +1 -1
- package/build/scripts/runUiAutomodule.js +1 -1
- package/build/scripts/runUiAutomodule.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/AbstractAutomoduleTest.ts +2 -1
- package/src/__tests__/AbstractPackageTest.ts +3 -2
- package/src/__tests__/impl/GitAutocloner.test.ts +2 -1
- package/src/__tests__/impl/ImplAutomodule.test.ts +2 -1
- package/src/__tests__/impl/NpmAutopackage.test.ts +2 -1
- package/src/__tests__/impl/TypescriptClassSnippetSuite.test.ts +42 -42
- package/src/__tests__/impl/UiAutomodule.test.ts +2 -1
- package/src/__tests__/impl/VscodeSnippetKeybinder.test.ts +3 -2
- package/src/impl/TypescriptClassSnippetSuite.ts +43 -43
- package/src/impl/VscodeSnippetKeybinder.ts +2 -2
- package/src/scripts/runAutopackage.ts +1 -1
- package/src/scripts/runImplAutomodule.ts +1 -1
- package/src/scripts/runUiAutomodule.ts +1 -1
- package/build/scripts/expandHomeDir.js.map +0 -1
- /package/build/{scripts → functions}/expandHomeDir.d.ts +0 -0
- /package/build/{scripts → functions}/expandHomeDir.js +0 -0
- /package/src/{scripts → functions}/expandHomeDir.ts +0 -0
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const promises_1 = require("fs/promises");
|
|
7
|
-
const expandHomeDir_1 = __importDefault(require("../
|
|
7
|
+
const expandHomeDir_1 = __importDefault(require("../functions/expandHomeDir"));
|
|
8
8
|
class TypescriptClassSnippetSuite {
|
|
9
9
|
constructor() {
|
|
10
10
|
this.vscodeDir = (0, expandHomeDir_1.default)('~/Library/Application Support/Code/User');
|
|
@@ -14,58 +14,58 @@ class TypescriptClassSnippetSuite {
|
|
|
14
14
|
this.keybindEndMarker = '// === TYPESCRIPT CLASS KEYBINDINGS END ===';
|
|
15
15
|
this.snippets = `
|
|
16
16
|
// === PUBLIC ===
|
|
17
|
-
"Public constructor": { "scope": "typescript", "prefix": "public.constructor", "body": ["public constructor(\${1:}) {\${2:} }"] },
|
|
18
|
-
"Public field": { "scope": "typescript", "prefix": "public.field", "body": ["public \${1:newField} = \${2:undefined}"] },
|
|
19
|
-
"Public readonly field": { "scope": "typescript", "prefix": "public.readonly.field", "body": ["public readonly \${1:newField} = \${2:undefined}"] },
|
|
20
|
-
"Public getter": { "scope": "typescript", "prefix": "public.getter", "body": ["public get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
21
|
-
"Public setter": { "scope": "typescript", "prefix": "public.setter", "body": ["public set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
22
|
-
"Public method": { "scope": "typescript", "prefix": "public.method", "body": ["public \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
23
|
-
"Public async method": { "scope": "typescript", "prefix": "public.async.method", "body": ["public async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
24
|
-
"Public abstract method": { "scope": "typescript", "prefix": "public.abstract.method", "body": ["public abstract \${1:newMethod}(\${2:}): \${3:unknown}"] },
|
|
17
|
+
"Public constructor": { "scope": "typescript,typescriptreact", "prefix": "public.constructor", "body": ["public constructor(\${1:}) {\${2:} }"] },
|
|
18
|
+
"Public field": { "scope": "typescript,typescriptreact", "prefix": "public.field", "body": ["public \${1:newField} = \${2:undefined}"] },
|
|
19
|
+
"Public readonly field": { "scope": "typescript,typescriptreact", "prefix": "public.readonly.field", "body": ["public readonly \${1:newField} = \${2:undefined}"] },
|
|
20
|
+
"Public getter": { "scope": "typescript,typescriptreact", "prefix": "public.getter", "body": ["public get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
21
|
+
"Public setter": { "scope": "typescript,typescriptreact", "prefix": "public.setter", "body": ["public set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
22
|
+
"Public method": { "scope": "typescript,typescriptreact", "prefix": "public.method", "body": ["public \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
23
|
+
"Public async method": { "scope": "typescript,typescriptreact", "prefix": "public.async.method", "body": ["public async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
24
|
+
"Public abstract method": { "scope": "typescript,typescriptreact", "prefix": "public.abstract.method", "body": ["public abstract \${1:newMethod}(\${2:}): \${3:unknown}"] },
|
|
25
25
|
|
|
26
26
|
// === PROTECTED ===
|
|
27
|
-
"Protected constructor": { "scope": "typescript", "prefix": "protected.constructor", "body": ["protected constructor(\${1:}) {\${2:} }"] },
|
|
28
|
-
"Protected field": { "scope": "typescript", "prefix": "protected.field", "body": ["protected \${1:newField} = \${2:undefined}"] },
|
|
29
|
-
"Protected readonly field": { "scope": "typescript", "prefix": "protected.readonly.field", "body": ["protected readonly \${1:newField} = \${2:undefined}"] },
|
|
30
|
-
"Protected getter": { "scope": "typescript", "prefix": "protected.getter", "body": ["protected get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
31
|
-
"Protected setter": { "scope": "typescript", "prefix": "protected.setter", "body": ["protected set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
32
|
-
"Protected method": { "scope": "typescript", "prefix": "protected.method", "body": ["protected \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
33
|
-
"Protected async method": { "scope": "typescript", "prefix": "protected.async.method", "body": ["protected async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
34
|
-
"Protected abstract method": { "scope": "typescript", "prefix": "protected.abstract.method", "body": ["protected abstract \${1:newMethod}(\${2:}): \${3:unknown}"] },
|
|
27
|
+
"Protected constructor": { "scope": "typescript,typescriptreact", "prefix": "protected.constructor", "body": ["protected constructor(\${1:}) {\${2:} }"] },
|
|
28
|
+
"Protected field": { "scope": "typescript,typescriptreact", "prefix": "protected.field", "body": ["protected \${1:newField} = \${2:undefined}"] },
|
|
29
|
+
"Protected readonly field": { "scope": "typescript,typescriptreact", "prefix": "protected.readonly.field", "body": ["protected readonly \${1:newField} = \${2:undefined}"] },
|
|
30
|
+
"Protected getter": { "scope": "typescript,typescriptreact", "prefix": "protected.getter", "body": ["protected get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
31
|
+
"Protected setter": { "scope": "typescript,typescriptreact", "prefix": "protected.setter", "body": ["protected set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
32
|
+
"Protected method": { "scope": "typescript,typescriptreact", "prefix": "protected.method", "body": ["protected \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
33
|
+
"Protected async method": { "scope": "typescript,typescriptreact", "prefix": "protected.async.method", "body": ["protected async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
34
|
+
"Protected abstract method": { "scope": "typescript,typescriptreact", "prefix": "protected.abstract.method", "body": ["protected abstract \${1:newMethod}(\${2:}): \${3:unknown}"] },
|
|
35
35
|
|
|
36
36
|
// === PRIVATE ===
|
|
37
|
-
"Private constructor": { "scope": "typescript", "prefix": "private.constructor", "body": ["private constructor(\${1:}) {\${2:} }"] },
|
|
38
|
-
"Private field": { "scope": "typescript", "prefix": "private.field", "body": ["private \${1:newField} = \${2:undefined}"] },
|
|
39
|
-
"Private readonly field": { "scope": "typescript", "prefix": "private.readonly.field", "body": ["private readonly \${1:newField} = \${2:undefined}"] },
|
|
40
|
-
"Private getter": { "scope": "typescript", "prefix": "private.getter", "body": ["private get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
41
|
-
"Private setter": { "scope": "typescript", "prefix": "private.setter", "body": ["private set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
42
|
-
"Private method": { "scope": "typescript", "prefix": "private.method", "body": ["private \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
43
|
-
"Private async method": { "scope": "typescript", "prefix": "private.async.method", "body": ["private async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
44
|
-
"Private abstract method": { "scope": "typescript", "prefix": "private.abstract.method", "body": ["private abstract \${1:newMethod}(\${2:}): \${3:unknown}"] },
|
|
37
|
+
"Private constructor": { "scope": "typescript,typescriptreact", "prefix": "private.constructor", "body": ["private constructor(\${1:}) {\${2:} }"] },
|
|
38
|
+
"Private field": { "scope": "typescript,typescriptreact", "prefix": "private.field", "body": ["private \${1:newField} = \${2:undefined}"] },
|
|
39
|
+
"Private readonly field": { "scope": "typescript,typescriptreact", "prefix": "private.readonly.field", "body": ["private readonly \${1:newField} = \${2:undefined}"] },
|
|
40
|
+
"Private getter": { "scope": "typescript,typescriptreact", "prefix": "private.getter", "body": ["private get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
41
|
+
"Private setter": { "scope": "typescript,typescriptreact", "prefix": "private.setter", "body": ["private set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
42
|
+
"Private method": { "scope": "typescript,typescriptreact", "prefix": "private.method", "body": ["private \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
43
|
+
"Private async method": { "scope": "typescript,typescriptreact", "prefix": "private.async.method", "body": ["private async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
44
|
+
"Private abstract method": { "scope": "typescript,typescriptreact", "prefix": "private.abstract.method", "body": ["private abstract \${1:newMethod}(\${2:}): \${3:unknown}"] },
|
|
45
45
|
|
|
46
46
|
// === PUBLIC STATIC ===
|
|
47
|
-
"Public static field": { "scope": "typescript", "prefix": "public.static.field", "body": ["public static \${1:newField} = \${2:undefined}"] },
|
|
48
|
-
"Public static readonly field": { "scope": "typescript", "prefix": "public.static.readonly.field", "body": ["public static readonly \${1:newField} = \${2:undefined}"] },
|
|
49
|
-
"Public static getter": { "scope": "typescript", "prefix": "public.static.getter", "body": ["public static get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
50
|
-
"Public static setter": { "scope": "typescript", "prefix": "public.static.setter", "body": ["public static set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
51
|
-
"Public static method": { "scope": "typescript", "prefix": "public.static.method", "body": ["public static \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
52
|
-
"Public static async method": { "scope": "typescript", "prefix": "public.static.async.method", "body": ["public static async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
47
|
+
"Public static field": { "scope": "typescript,typescriptreact", "prefix": "public.static.field", "body": ["public static \${1:newField} = \${2:undefined}"] },
|
|
48
|
+
"Public static readonly field": { "scope": "typescript,typescriptreact", "prefix": "public.static.readonly.field", "body": ["public static readonly \${1:newField} = \${2:undefined}"] },
|
|
49
|
+
"Public static getter": { "scope": "typescript,typescriptreact", "prefix": "public.static.getter", "body": ["public static get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
50
|
+
"Public static setter": { "scope": "typescript,typescriptreact", "prefix": "public.static.setter", "body": ["public static set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
51
|
+
"Public static method": { "scope": "typescript,typescriptreact", "prefix": "public.static.method", "body": ["public static \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
52
|
+
"Public static async method": { "scope": "typescript,typescriptreact", "prefix": "public.static.async.method", "body": ["public static async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
53
53
|
|
|
54
54
|
// === PROTECTED STATIC ===
|
|
55
|
-
"Protected static field": { "scope": "typescript", "prefix": "protected.static.field", "body": ["protected static \${1:newField} = \${2:undefined}"] },
|
|
56
|
-
"Protected static readonly field": { "scope": "typescript", "prefix": "protected.static.readonly.field", "body": ["protected static readonly \${1:newField} = \${2:undefined}"] },
|
|
57
|
-
"Protected static getter": { "scope": "typescript", "prefix": "protected.static.getter", "body": ["protected static get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
58
|
-
"Protected static setter": { "scope": "typescript", "prefix": "protected.static.setter", "body": ["protected static set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
59
|
-
"Protected static method": { "scope": "typescript", "prefix": "protected.static.method", "body": ["protected static \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
60
|
-
"Protected static async method": { "scope": "typescript", "prefix": "protected.static.async.method", "body": ["protected static async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
55
|
+
"Protected static field": { "scope": "typescript,typescriptreact", "prefix": "protected.static.field", "body": ["protected static \${1:newField} = \${2:undefined}"] },
|
|
56
|
+
"Protected static readonly field": { "scope": "typescript,typescriptreact", "prefix": "protected.static.readonly.field", "body": ["protected static readonly \${1:newField} = \${2:undefined}"] },
|
|
57
|
+
"Protected static getter": { "scope": "typescript,typescriptreact", "prefix": "protected.static.getter", "body": ["protected static get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
58
|
+
"Protected static setter": { "scope": "typescript,typescriptreact", "prefix": "protected.static.setter", "body": ["protected static set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
59
|
+
"Protected static method": { "scope": "typescript,typescriptreact", "prefix": "protected.static.method", "body": ["protected static \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
60
|
+
"Protected static async method": { "scope": "typescript,typescriptreact", "prefix": "protected.static.async.method", "body": ["protected static async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
61
61
|
|
|
62
62
|
// === PRIVATE STATIC ===
|
|
63
|
-
"Private static field": { "scope": "typescript", "prefix": "private.static.field", "body": ["private static \${1:newField} = \${2:undefined}"] },
|
|
64
|
-
"Private static readonly field": { "scope": "typescript", "prefix": "private.static.readonly.field", "body": ["private static readonly \${1:newField} = \${2:undefined}"] },
|
|
65
|
-
"Private static getter": { "scope": "typescript", "prefix": "private.static.getter", "body": ["private static get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
66
|
-
"Private static setter": { "scope": "typescript", "prefix": "private.static.setter", "body": ["private static set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
67
|
-
"Private static method": { "scope": "typescript", "prefix": "private.static.method", "body": ["private static \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
68
|
-
"Private static async method": { "scope": "typescript", "prefix": "private.static.async.method", "body": ["private static async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] }
|
|
63
|
+
"Private static field": { "scope": "typescript,typescriptreact", "prefix": "private.static.field", "body": ["private static \${1:newField} = \${2:undefined}"] },
|
|
64
|
+
"Private static readonly field": { "scope": "typescript,typescriptreact", "prefix": "private.static.readonly.field", "body": ["private static readonly \${1:newField} = \${2:undefined}"] },
|
|
65
|
+
"Private static getter": { "scope": "typescript,typescriptreact", "prefix": "private.static.getter", "body": ["private static get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
66
|
+
"Private static setter": { "scope": "typescript,typescriptreact", "prefix": "private.static.setter", "body": ["private static set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
67
|
+
"Private static method": { "scope": "typescript,typescriptreact", "prefix": "private.static.method", "body": ["private static \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
68
|
+
"Private static async method": { "scope": "typescript,typescriptreact", "prefix": "private.static.async.method", "body": ["private static async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] }
|
|
69
69
|
`.replace(/^[ \t]+/gm, '');
|
|
70
70
|
this.indentedSnippets = this.snippets
|
|
71
71
|
.split('\n')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypescriptClassSnippetSuite.js","sourceRoot":"","sources":["../../src/impl/TypescriptClassSnippetSuite.ts"],"names":[],"mappings":";;;;;AAAA,0CAAiD;AACjD
|
|
1
|
+
{"version":3,"file":"TypescriptClassSnippetSuite.js","sourceRoot":"","sources":["../../src/impl/TypescriptClassSnippetSuite.ts"],"names":[],"mappings":";;;;;AAAA,0CAAiD;AACjD,+EAAsD;AAEtD,MAAqB,2BAA2B;IAQ5C;QA6BiB,cAAS,GAAG,IAAA,uBAAa,EACtC,yCAAyC,CAC5C,CAAA;QAUO,uBAAkB,GAAG,4CAA4C,CAAA;QASjE,qBAAgB,GAAG,0CAA0C,CAAA;QAmF7D,uBAAkB,GAAG,+CAA+C,CAAA;QACpE,qBAAgB,GAAG,6CAA6C,CAAA;QA+BvD,aAAQ,GAAG;;;;;;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C,eAAe,EACpB,GAAG,MAAM,GAAG,IAAI,CAAC,eAAe,GAAG,KAAK,EAAE,CAC7C,CAAA;QACL,CAAC;IACL,CAAC;IAED,IAAY,QAAQ;QAChB,OAAO,2BAA2B,CAAC,QAAQ,CAAA;IAC/C,CAAC;IAED,IAAY,SAAS;QACjB,OAAO,2BAA2B,CAAC,SAAS,CAAA;IAChD,CAAC;;AAzKa,oCAAQ,GAAG,mBAAQ,AAAX,CAAW;AACnB,qCAAS,GAAG,oBAAS,AAAZ,CAAY;kBAHlB,2BAA2B"}
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const promises_1 = require("fs/promises");
|
|
7
7
|
const jsonc_parser_1 = require("jsonc-parser");
|
|
8
|
-
const expandHomeDir_1 = __importDefault(require("../
|
|
8
|
+
const expandHomeDir_1 = __importDefault(require("../functions/expandHomeDir"));
|
|
9
9
|
class VscodeSnippetKeybinder {
|
|
10
10
|
constructor(options) {
|
|
11
11
|
this.vscodeDir = (0, expandHomeDir_1.default)('~/Library/Application Support/Code/User');
|
|
@@ -30,7 +30,7 @@ class VscodeSnippetKeybinder {
|
|
|
30
30
|
const updated = {
|
|
31
31
|
...snippets,
|
|
32
32
|
[this.name]: {
|
|
33
|
-
scope: '
|
|
33
|
+
scope: 'typescript,typescriptreact',
|
|
34
34
|
prefix: this.toCommandId(this.name),
|
|
35
35
|
body: this.lines,
|
|
36
36
|
description: this.description,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VscodeSnippetKeybinder.js","sourceRoot":"","sources":["../../src/impl/VscodeSnippetKeybinder.ts"],"names":[],"mappings":";;;;;AAAA,0CAAiD;AACjD,+CAAoC;AACpC
|
|
1
|
+
{"version":3,"file":"VscodeSnippetKeybinder.js","sourceRoot":"","sources":["../../src/impl/VscodeSnippetKeybinder.ts"],"names":[],"mappings":";;;;;AAAA,0CAA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@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const expandHomeDir_1 = __importDefault(require("../functions/expandHomeDir"));
|
|
6
7
|
const NpmAutopackage_1 = __importDefault(require("../impl/NpmAutopackage"));
|
|
7
|
-
const expandHomeDir_1 = __importDefault(require("./expandHomeDir"));
|
|
8
8
|
async function main() {
|
|
9
9
|
console.log('Running autopackage...');
|
|
10
10
|
const instance = NpmAutopackage_1.default.Create({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runAutopackage.js","sourceRoot":"","sources":["../../src/scripts/runAutopackage.ts"],"names":[],"mappings":";;;;;AAAA,4EAAmD;
|
|
1
|
+
{"version":3,"file":"runAutopackage.js","sourceRoot":"","sources":["../../src/scripts/runAutopackage.ts"],"names":[],"mappings":";;;;;AAAA,+EAAsD;AACtD,4EAAmD;AAEnD,KAAK,UAAU,IAAI;IACf,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAA;IAErC,MAAM,QAAQ,GAAG,wBAAc,CAAC,MAAM,CAAC;QACnC,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,yDAAyD;QACtE,YAAY,EAAE,WAAW;QACzB,YAAY,EAAE,WAAW;QACzB,UAAU,EAAE,IAAA,uBAAa,EAAC,OAAO,CAAC;QAClC,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,uCAAuC;KAClD,CAAC,CAAA;IAEF,MAAM,QAAQ,CAAC,GAAG,EAAE,CAAA;AACxB,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAClB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACnB,CAAC,CAAC,CAAA"}
|
|
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const expandHomeDir_1 = __importDefault(require("../functions/expandHomeDir"));
|
|
6
7
|
const ImplAutomodule_1 = __importDefault(require("../impl/ImplAutomodule"));
|
|
7
|
-
const expandHomeDir_1 = __importDefault(require("./expandHomeDir"));
|
|
8
8
|
async function main() {
|
|
9
9
|
console.log('\nRunning automodule...');
|
|
10
10
|
const instance = ImplAutomodule_1.default.Create({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runImplAutomodule.js","sourceRoot":"","sources":["../../src/scripts/runImplAutomodule.ts"],"names":[],"mappings":";;;;;AAAA,4EAAmD;
|
|
1
|
+
{"version":3,"file":"runImplAutomodule.js","sourceRoot":"","sources":["../../src/scripts/runImplAutomodule.ts"],"names":[],"mappings":";;;;;AAAA,+EAAsD;AACtD,4EAAmD;AAEnD,KAAK,UAAU,IAAI;IACf,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAA;IAEtC,MAAM,QAAQ,GAAG,wBAAc,CAAC,MAAM,CAAC;QACnC,WAAW,EAAE,IAAA,uBAAa,EAAC,uCAAuC,CAAC;QACnE,aAAa,EAAE,IAAA,uBAAa,EAAC,6BAA6B,CAAC;QAC3D,WAAW,EAAE,IAAA,uBAAa,EAAC,2CAA2C,CAAC;QACvE,aAAa,EAAE,WAAW;QAC1B,QAAQ,EAAE,eAAe;KAC5B,CAAC,CAAA;IAEF,MAAM,QAAQ,CAAC,GAAG,EAAE,CAAA;IAEpB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAA;AACjD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAClB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACnB,CAAC,CAAC,CAAA"}
|
|
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const expandHomeDir_1 = __importDefault(require("../functions/expandHomeDir"));
|
|
6
7
|
const UiAutomodule_1 = __importDefault(require("../impl/UiAutomodule"));
|
|
7
|
-
const expandHomeDir_1 = __importDefault(require("./expandHomeDir"));
|
|
8
8
|
async function main() {
|
|
9
9
|
console.log('\nRunning automodule...');
|
|
10
10
|
const instance = UiAutomodule_1.default.Create({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runUiAutomodule.js","sourceRoot":"","sources":["../../src/scripts/runUiAutomodule.ts"],"names":[],"mappings":";;;;;AAAA,wEAA+C;
|
|
1
|
+
{"version":3,"file":"runUiAutomodule.js","sourceRoot":"","sources":["../../src/scripts/runUiAutomodule.ts"],"names":[],"mappings":";;;;;AAAA,+EAAsD;AACtD,wEAA+C;AAE/C,KAAK,UAAU,IAAI;IACf,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAA;IAEtC,MAAM,QAAQ,GAAG,sBAAY,CAAC,MAAM,CAAC;QACjC,WAAW,EAAE,IAAA,uBAAa,EAAC,uCAAuC,CAAC;QACnE,aAAa,EAAE,IAAA,uBAAa,EAAC,6BAA6B,CAAC;QAC3D,WAAW,EAAE,IAAA,uBAAa,EAAC,2CAA2C,CAAC;QACvE,aAAa,EAAE,WAAW;KAC7B,CAAC,CAAA;IAEF,MAAM,QAAQ,CAAC,GAAG,EAAE,CAAA;IAEpB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAA;AACjD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACjB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAClB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACnB,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { exec as execSync } from 'child_process'
|
|
2
2
|
import { readFile, writeFile } from 'fs/promises'
|
|
3
3
|
import { promisify } from 'util'
|
|
4
|
-
import { assert
|
|
4
|
+
import { assert } from '@sprucelabs/test-utils'
|
|
5
5
|
import {
|
|
6
6
|
fakeExec,
|
|
7
7
|
fakePathExists,
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
resetCallsToWriteFile,
|
|
14
14
|
setPathShouldExist,
|
|
15
15
|
} from '@neurodevs/fake-node-core'
|
|
16
|
+
import generateId from '@neurodevs/generate-id'
|
|
16
17
|
import AbstractAutomodule from '../impl/AbstractAutomodule'
|
|
17
18
|
import { Automodule } from '../types'
|
|
18
19
|
import AbstractPackageTest from './AbstractPackageTest'
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import AbstractSpruceTest
|
|
1
|
+
import AbstractSpruceTest from '@sprucelabs/test-utils'
|
|
2
2
|
import { setFakeReadFileResult } from '@neurodevs/fake-node-core'
|
|
3
|
-
import
|
|
3
|
+
import generateId from '@neurodevs/generate-id'
|
|
4
|
+
import expandHomeDir from '../functions/expandHomeDir'
|
|
4
5
|
|
|
5
6
|
export default class AbstractPackageTest extends AbstractSpruceTest {
|
|
6
7
|
protected static async beforeEach() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { exec as execSync } from 'child_process'
|
|
2
2
|
import { promisify } from 'util'
|
|
3
|
-
import { test, assert
|
|
3
|
+
import { test, assert } from '@sprucelabs/test-utils'
|
|
4
4
|
import {
|
|
5
5
|
callsToChdir,
|
|
6
6
|
callsToExec,
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
resetCallsToExec,
|
|
12
12
|
setPathShouldExist,
|
|
13
13
|
} from '@neurodevs/fake-node-core'
|
|
14
|
+
import generateId from '@neurodevs/generate-id'
|
|
14
15
|
import { pathExists } from 'fs-extra'
|
|
15
16
|
import GitAutocloner, {
|
|
16
17
|
Autocloner,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { test, assert
|
|
1
|
+
import { test, assert } from '@sprucelabs/test-utils'
|
|
2
2
|
import {
|
|
3
3
|
callsToExec,
|
|
4
4
|
callsToWriteFile,
|
|
5
5
|
setFakeReadFileResult,
|
|
6
6
|
setFakeReadFileThrowsFor,
|
|
7
7
|
} from '@neurodevs/fake-node-core'
|
|
8
|
+
import generateId from '@neurodevs/generate-id'
|
|
8
9
|
import ImplAutomodule from '../../impl/ImplAutomodule'
|
|
9
10
|
import AbstractAutomoduleTest from '../AbstractAutomoduleTest'
|
|
10
11
|
|
|
@@ -2,7 +2,7 @@ import { ChildProcess, exec as execSync } from 'child_process'
|
|
|
2
2
|
import { readFile, writeFile } from 'fs/promises'
|
|
3
3
|
import path from 'path'
|
|
4
4
|
import { promisify } from 'util'
|
|
5
|
-
import { test, assert
|
|
5
|
+
import { test, assert } from '@sprucelabs/test-utils'
|
|
6
6
|
import {
|
|
7
7
|
callsToChdir,
|
|
8
8
|
callsToExec,
|
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
setFakeReadFileResult,
|
|
27
27
|
setPathShouldExist,
|
|
28
28
|
} from '@neurodevs/fake-node-core'
|
|
29
|
+
import generateId from '@neurodevs/generate-id'
|
|
29
30
|
import NpmAutopackage, {
|
|
30
31
|
Autopackage,
|
|
31
32
|
AutopackageOptions,
|
|
@@ -143,58 +143,58 @@ export default class TypescriptClassSnippetSuiteTest extends AbstractPackageTest
|
|
|
143
143
|
|
|
144
144
|
private static readonly snippets = `
|
|
145
145
|
// === PUBLIC ===
|
|
146
|
-
"Public constructor": { "scope": "typescript", "prefix": "public.constructor", "body": ["public constructor(\${1:}) {\${2:} }"] },
|
|
147
|
-
"Public field": { "scope": "typescript", "prefix": "public.field", "body": ["public \${1:newField} = \${2:undefined}"] },
|
|
148
|
-
"Public readonly field": { "scope": "typescript", "prefix": "public.readonly.field", "body": ["public readonly \${1:newField} = \${2:undefined}"] },
|
|
149
|
-
"Public getter": { "scope": "typescript", "prefix": "public.getter", "body": ["public get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
150
|
-
"Public setter": { "scope": "typescript", "prefix": "public.setter", "body": ["public set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
151
|
-
"Public method": { "scope": "typescript", "prefix": "public.method", "body": ["public \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
152
|
-
"Public async method": { "scope": "typescript", "prefix": "public.async.method", "body": ["public async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
153
|
-
"Public abstract method": { "scope": "typescript", "prefix": "public.abstract.method", "body": ["public abstract \${1:newMethod}(\${2:}): \${3:unknown}"] },
|
|
146
|
+
"Public constructor": { "scope": "typescript,typescriptreact", "prefix": "public.constructor", "body": ["public constructor(\${1:}) {\${2:} }"] },
|
|
147
|
+
"Public field": { "scope": "typescript,typescriptreact", "prefix": "public.field", "body": ["public \${1:newField} = \${2:undefined}"] },
|
|
148
|
+
"Public readonly field": { "scope": "typescript,typescriptreact", "prefix": "public.readonly.field", "body": ["public readonly \${1:newField} = \${2:undefined}"] },
|
|
149
|
+
"Public getter": { "scope": "typescript,typescriptreact", "prefix": "public.getter", "body": ["public get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
150
|
+
"Public setter": { "scope": "typescript,typescriptreact", "prefix": "public.setter", "body": ["public set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
151
|
+
"Public method": { "scope": "typescript,typescriptreact", "prefix": "public.method", "body": ["public \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
152
|
+
"Public async method": { "scope": "typescript,typescriptreact", "prefix": "public.async.method", "body": ["public async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
153
|
+
"Public abstract method": { "scope": "typescript,typescriptreact", "prefix": "public.abstract.method", "body": ["public abstract \${1:newMethod}(\${2:}): \${3:unknown}"] },
|
|
154
154
|
|
|
155
155
|
// === PROTECTED ===
|
|
156
|
-
"Protected constructor": { "scope": "typescript", "prefix": "protected.constructor", "body": ["protected constructor(\${1:}) {\${2:} }"] },
|
|
157
|
-
"Protected field": { "scope": "typescript", "prefix": "protected.field", "body": ["protected \${1:newField} = \${2:undefined}"] },
|
|
158
|
-
"Protected readonly field": { "scope": "typescript", "prefix": "protected.readonly.field", "body": ["protected readonly \${1:newField} = \${2:undefined}"] },
|
|
159
|
-
"Protected getter": { "scope": "typescript", "prefix": "protected.getter", "body": ["protected get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
160
|
-
"Protected setter": { "scope": "typescript", "prefix": "protected.setter", "body": ["protected set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
161
|
-
"Protected method": { "scope": "typescript", "prefix": "protected.method", "body": ["protected \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
162
|
-
"Protected async method": { "scope": "typescript", "prefix": "protected.async.method", "body": ["protected async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
163
|
-
"Protected abstract method": { "scope": "typescript", "prefix": "protected.abstract.method", "body": ["protected abstract \${1:newMethod}(\${2:}): \${3:unknown}"] },
|
|
156
|
+
"Protected constructor": { "scope": "typescript,typescriptreact", "prefix": "protected.constructor", "body": ["protected constructor(\${1:}) {\${2:} }"] },
|
|
157
|
+
"Protected field": { "scope": "typescript,typescriptreact", "prefix": "protected.field", "body": ["protected \${1:newField} = \${2:undefined}"] },
|
|
158
|
+
"Protected readonly field": { "scope": "typescript,typescriptreact", "prefix": "protected.readonly.field", "body": ["protected readonly \${1:newField} = \${2:undefined}"] },
|
|
159
|
+
"Protected getter": { "scope": "typescript,typescriptreact", "prefix": "protected.getter", "body": ["protected get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
160
|
+
"Protected setter": { "scope": "typescript,typescriptreact", "prefix": "protected.setter", "body": ["protected set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
161
|
+
"Protected method": { "scope": "typescript,typescriptreact", "prefix": "protected.method", "body": ["protected \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
162
|
+
"Protected async method": { "scope": "typescript,typescriptreact", "prefix": "protected.async.method", "body": ["protected async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
163
|
+
"Protected abstract method": { "scope": "typescript,typescriptreact", "prefix": "protected.abstract.method", "body": ["protected abstract \${1:newMethod}(\${2:}): \${3:unknown}"] },
|
|
164
164
|
|
|
165
165
|
// === PRIVATE ===
|
|
166
|
-
"Private constructor": { "scope": "typescript", "prefix": "private.constructor", "body": ["private constructor(\${1:}) {\${2:} }"] },
|
|
167
|
-
"Private field": { "scope": "typescript", "prefix": "private.field", "body": ["private \${1:newField} = \${2:undefined}"] },
|
|
168
|
-
"Private readonly field": { "scope": "typescript", "prefix": "private.readonly.field", "body": ["private readonly \${1:newField} = \${2:undefined}"] },
|
|
169
|
-
"Private getter": { "scope": "typescript", "prefix": "private.getter", "body": ["private get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
170
|
-
"Private setter": { "scope": "typescript", "prefix": "private.setter", "body": ["private set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
171
|
-
"Private method": { "scope": "typescript", "prefix": "private.method", "body": ["private \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
172
|
-
"Private async method": { "scope": "typescript", "prefix": "private.async.method", "body": ["private async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
173
|
-
"Private abstract method": { "scope": "typescript", "prefix": "private.abstract.method", "body": ["private abstract \${1:newMethod}(\${2:}): \${3:unknown}"] },
|
|
166
|
+
"Private constructor": { "scope": "typescript,typescriptreact", "prefix": "private.constructor", "body": ["private constructor(\${1:}) {\${2:} }"] },
|
|
167
|
+
"Private field": { "scope": "typescript,typescriptreact", "prefix": "private.field", "body": ["private \${1:newField} = \${2:undefined}"] },
|
|
168
|
+
"Private readonly field": { "scope": "typescript,typescriptreact", "prefix": "private.readonly.field", "body": ["private readonly \${1:newField} = \${2:undefined}"] },
|
|
169
|
+
"Private getter": { "scope": "typescript,typescriptreact", "prefix": "private.getter", "body": ["private get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
170
|
+
"Private setter": { "scope": "typescript,typescriptreact", "prefix": "private.setter", "body": ["private set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
171
|
+
"Private method": { "scope": "typescript,typescriptreact", "prefix": "private.method", "body": ["private \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
172
|
+
"Private async method": { "scope": "typescript,typescriptreact", "prefix": "private.async.method", "body": ["private async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
173
|
+
"Private abstract method": { "scope": "typescript,typescriptreact", "prefix": "private.abstract.method", "body": ["private abstract \${1:newMethod}(\${2:}): \${3:unknown}"] },
|
|
174
174
|
|
|
175
175
|
// === PUBLIC STATIC ===
|
|
176
|
-
"Public static field": { "scope": "typescript", "prefix": "public.static.field", "body": ["public static \${1:newField} = \${2:undefined}"] },
|
|
177
|
-
"Public static readonly field": { "scope": "typescript", "prefix": "public.static.readonly.field", "body": ["public static readonly \${1:newField} = \${2:undefined}"] },
|
|
178
|
-
"Public static getter": { "scope": "typescript", "prefix": "public.static.getter", "body": ["public static get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
179
|
-
"Public static setter": { "scope": "typescript", "prefix": "public.static.setter", "body": ["public static set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
180
|
-
"Public static method": { "scope": "typescript", "prefix": "public.static.method", "body": ["public static \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
181
|
-
"Public static async method": { "scope": "typescript", "prefix": "public.static.async.method", "body": ["public static async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
176
|
+
"Public static field": { "scope": "typescript,typescriptreact", "prefix": "public.static.field", "body": ["public static \${1:newField} = \${2:undefined}"] },
|
|
177
|
+
"Public static readonly field": { "scope": "typescript,typescriptreact", "prefix": "public.static.readonly.field", "body": ["public static readonly \${1:newField} = \${2:undefined}"] },
|
|
178
|
+
"Public static getter": { "scope": "typescript,typescriptreact", "prefix": "public.static.getter", "body": ["public static get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
179
|
+
"Public static setter": { "scope": "typescript,typescriptreact", "prefix": "public.static.setter", "body": ["public static set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
180
|
+
"Public static method": { "scope": "typescript,typescriptreact", "prefix": "public.static.method", "body": ["public static \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
181
|
+
"Public static async method": { "scope": "typescript,typescriptreact", "prefix": "public.static.async.method", "body": ["public static async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
182
182
|
|
|
183
183
|
// === PROTECTED STATIC ===
|
|
184
|
-
"Protected static field": { "scope": "typescript", "prefix": "protected.static.field", "body": ["protected static \${1:newField} = \${2:undefined}"] },
|
|
185
|
-
"Protected static readonly field": { "scope": "typescript", "prefix": "protected.static.readonly.field", "body": ["protected static readonly \${1:newField} = \${2:undefined}"] },
|
|
186
|
-
"Protected static getter": { "scope": "typescript", "prefix": "protected.static.getter", "body": ["protected static get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
187
|
-
"Protected static setter": { "scope": "typescript", "prefix": "protected.static.setter", "body": ["protected static set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
188
|
-
"Protected static method": { "scope": "typescript", "prefix": "protected.static.method", "body": ["protected static \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
189
|
-
"Protected static async method": { "scope": "typescript", "prefix": "protected.static.async.method", "body": ["protected static async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
184
|
+
"Protected static field": { "scope": "typescript,typescriptreact", "prefix": "protected.static.field", "body": ["protected static \${1:newField} = \${2:undefined}"] },
|
|
185
|
+
"Protected static readonly field": { "scope": "typescript,typescriptreact", "prefix": "protected.static.readonly.field", "body": ["protected static readonly \${1:newField} = \${2:undefined}"] },
|
|
186
|
+
"Protected static getter": { "scope": "typescript,typescriptreact", "prefix": "protected.static.getter", "body": ["protected static get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
187
|
+
"Protected static setter": { "scope": "typescript,typescriptreact", "prefix": "protected.static.setter", "body": ["protected static set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
188
|
+
"Protected static method": { "scope": "typescript,typescriptreact", "prefix": "protected.static.method", "body": ["protected static \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
189
|
+
"Protected static async method": { "scope": "typescript,typescriptreact", "prefix": "protected.static.async.method", "body": ["protected static async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] },
|
|
190
190
|
|
|
191
191
|
// === PRIVATE STATIC ===
|
|
192
|
-
"Private static field": { "scope": "typescript", "prefix": "private.static.field", "body": ["private static \${1:newField} = \${2:undefined}"] },
|
|
193
|
-
"Private static readonly field": { "scope": "typescript", "prefix": "private.static.readonly.field", "body": ["private static readonly \${1:newField} = \${2:undefined}"] },
|
|
194
|
-
"Private static getter": { "scope": "typescript", "prefix": "private.static.getter", "body": ["private static get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
195
|
-
"Private static setter": { "scope": "typescript", "prefix": "private.static.setter", "body": ["private static set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
196
|
-
"Private static method": { "scope": "typescript", "prefix": "private.static.method", "body": ["private static \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
197
|
-
"Private static async method": { "scope": "typescript", "prefix": "private.static.async.method", "body": ["private static async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] }
|
|
192
|
+
"Private static field": { "scope": "typescript,typescriptreact", "prefix": "private.static.field", "body": ["private static \${1:newField} = \${2:undefined}"] },
|
|
193
|
+
"Private static readonly field": { "scope": "typescript,typescriptreact", "prefix": "private.static.readonly.field", "body": ["private static readonly \${1:newField} = \${2:undefined}"] },
|
|
194
|
+
"Private static getter": { "scope": "typescript,typescriptreact", "prefix": "private.static.getter", "body": ["private static get \${1:newProperty}() { return \${2:undefined} }"] },
|
|
195
|
+
"Private static setter": { "scope": "typescript,typescriptreact", "prefix": "private.static.setter", "body": ["private static set \${1:newProperty}(\${2:_value}: \${3:unknown}) {\${4:} }"] },
|
|
196
|
+
"Private static method": { "scope": "typescript,typescriptreact", "prefix": "private.static.method", "body": ["private static \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
197
|
+
"Private static async method": { "scope": "typescript,typescriptreact", "prefix": "private.static.async.method", "body": ["private static async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] }
|
|
198
198
|
`.replace(/^[ \t]+/gm, '')
|
|
199
199
|
|
|
200
200
|
private static readonly indentedSnippets = this.snippets
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { test, assert
|
|
1
|
+
import { test, assert } from '@sprucelabs/test-utils'
|
|
2
2
|
import {
|
|
3
3
|
callsToExec,
|
|
4
4
|
callsToWriteFile,
|
|
5
5
|
setFakeReadFileResult,
|
|
6
6
|
setFakeReadFileThrowsFor,
|
|
7
7
|
} from '@neurodevs/fake-node-core'
|
|
8
|
+
import generateId from '@neurodevs/generate-id'
|
|
8
9
|
import UiAutomodule from '../../impl/UiAutomodule'
|
|
9
10
|
import AbstractAutomoduleTest from '../AbstractAutomoduleTest'
|
|
10
11
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { readFile, writeFile } from 'fs/promises'
|
|
2
|
-
import { test, assert
|
|
2
|
+
import { test, assert } from '@sprucelabs/test-utils'
|
|
3
3
|
import {
|
|
4
4
|
callsToWriteFile,
|
|
5
5
|
fakeReadFile,
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
resetCallsToWriteFile,
|
|
9
9
|
setFakeReadFileResult,
|
|
10
10
|
} from '@neurodevs/fake-node-core'
|
|
11
|
+
import generateId from '@neurodevs/generate-id'
|
|
11
12
|
import VscodeSnippetKeybinder, {
|
|
12
13
|
SnippetKeybinder,
|
|
13
14
|
} from '../../impl/VscodeSnippetKeybinder'
|
|
@@ -122,7 +123,7 @@ export default class VscodeSnippetKeybinderTest extends AbstractPackageTest {
|
|
|
122
123
|
return {
|
|
123
124
|
...this.originalSnippet,
|
|
124
125
|
[this.fakeName]: {
|
|
125
|
-
scope: '
|
|
126
|
+
scope: 'stypescript,typescriptreact',
|
|
126
127
|
prefix: this.fakePrefix,
|
|
127
128
|
body: this.fakeLines,
|
|
128
129
|
description: this.fakeDescription,
|