@neurodevs/meta-node 0.14.8 → 0.14.10
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.d.ts +2 -2
- package/build/__tests__/AbstractAutomoduleTest.js +39 -44
- package/build/__tests__/AbstractAutomoduleTest.js.map +1 -1
- package/build/__tests__/AbstractPackageTest.d.ts +2 -2
- package/build/__tests__/AbstractPackageTest.js +19 -27
- package/build/__tests__/AbstractPackageTest.js.map +1 -1
- package/build/__tests__/impl/GitAutocloner.test.d.ts +1 -1
- package/build/__tests__/impl/GitAutocloner.test.js +45 -52
- package/build/__tests__/impl/GitAutocloner.test.js.map +1 -1
- package/build/__tests__/impl/ImplAutomodule.test.d.ts +1 -1
- package/build/__tests__/impl/ImplAutomodule.test.js +32 -38
- package/build/__tests__/impl/ImplAutomodule.test.js.map +1 -1
- package/build/__tests__/impl/NpmAutopackage.test.d.ts +3 -2
- package/build/__tests__/impl/NpmAutopackage.test.js +162 -162
- package/build/__tests__/impl/NpmAutopackage.test.js.map +1 -1
- package/build/__tests__/impl/PackageAutodocumenter.test.d.ts +1 -1
- package/build/__tests__/impl/PackageAutodocumenter.test.js +8 -13
- package/build/__tests__/impl/PackageAutodocumenter.test.js.map +1 -1
- package/build/__tests__/impl/TypescriptClassSnippetSuite.test.d.ts +1 -1
- package/build/__tests__/impl/TypescriptClassSnippetSuite.test.js +42 -49
- package/build/__tests__/impl/TypescriptClassSnippetSuite.test.js.map +1 -1
- package/build/__tests__/impl/UiAutomodule.test.d.ts +1 -1
- package/build/__tests__/impl/UiAutomodule.test.js +30 -38
- package/build/__tests__/impl/UiAutomodule.test.js.map +1 -1
- package/build/__tests__/impl/VscodeSnippetKeybinder.test.d.ts +1 -1
- package/build/__tests__/impl/VscodeSnippetKeybinder.test.js +50 -57
- package/build/__tests__/impl/VscodeSnippetKeybinder.test.js.map +1 -1
- package/build/functions/expandHomeDir.js +4 -10
- package/build/functions/expandHomeDir.js.map +1 -1
- package/build/impl/AbstractAutomodule.d.ts +1 -1
- package/build/impl/AbstractAutomodule.js +23 -14
- package/build/impl/AbstractAutomodule.js.map +1 -1
- package/build/impl/GitAutocloner.js +16 -15
- package/build/impl/GitAutocloner.js.map +1 -1
- package/build/impl/ImplAutomodule.d.ts +2 -2
- package/build/impl/ImplAutomodule.js +6 -9
- package/build/impl/ImplAutomodule.js.map +1 -1
- package/build/impl/NpmAutopackage.d.ts +1 -1
- package/build/impl/NpmAutopackage.js +36 -29
- package/build/impl/NpmAutopackage.js.map +1 -1
- package/build/impl/PackageAutodocumenter.js +2 -4
- package/build/impl/PackageAutodocumenter.js.map +1 -1
- package/build/impl/TypescriptClassSnippetSuite.js +125 -129
- package/build/impl/TypescriptClassSnippetSuite.js.map +1 -1
- package/build/impl/UiAutomodule.d.ts +2 -2
- package/build/impl/UiAutomodule.js +8 -11
- package/build/impl/UiAutomodule.js.map +1 -1
- package/build/impl/VscodeSnippetKeybinder.js +16 -17
- package/build/impl/VscodeSnippetKeybinder.js.map +1 -1
- package/build/index.d.ts +28 -28
- package/build/index.js +28 -62
- package/build/index.js.map +1 -1
- package/build/scripts/installSnippetSuite.js +2 -7
- package/build/scripts/installSnippetSuite.js.map +1 -1
- package/build/scripts/runAutopackage.js +4 -9
- package/build/scripts/runAutopackage.js.map +1 -1
- package/build/scripts/runImplAutomodule.js +6 -11
- package/build/scripts/runImplAutomodule.js.map +1 -1
- package/build/scripts/runSnippetKeybinder.js +2 -7
- package/build/scripts/runSnippetKeybinder.js.map +1 -1
- package/build/scripts/runUiAutomodule.js +6 -11
- package/build/scripts/runUiAutomodule.js.map +1 -1
- package/build/testDoubles/Autocloner/FakeAutocloner.d.ts +1 -1
- package/build/testDoubles/Autocloner/FakeAutocloner.js +3 -6
- package/build/testDoubles/Autocloner/FakeAutocloner.js.map +1 -1
- package/build/testDoubles/Autodocumenter/FakeAutodocumenter.d.ts +1 -1
- package/build/testDoubles/Autodocumenter/FakeAutodocumenter.js +2 -5
- package/build/testDoubles/Autodocumenter/FakeAutodocumenter.js.map +1 -1
- package/build/testDoubles/Automodule/FakeAutomodule.d.ts +3 -3
- package/build/testDoubles/Automodule/FakeAutomodule.js +3 -6
- package/build/testDoubles/Automodule/FakeAutomodule.js.map +1 -1
- package/build/testDoubles/Autopackage/FakeAutopackage.d.ts +1 -1
- package/build/testDoubles/Autopackage/FakeAutopackage.js +3 -6
- package/build/testDoubles/Autopackage/FakeAutopackage.js.map +1 -1
- package/build/testDoubles/SnippetKeybinder/FakeSnippetKeybinder.d.ts +1 -1
- package/build/testDoubles/SnippetKeybinder/FakeSnippetKeybinder.js +3 -5
- package/build/testDoubles/SnippetKeybinder/FakeSnippetKeybinder.js.map +1 -1
- package/build/testDoubles/SnippetSuite/FakeSnippetSuite.d.ts +1 -1
- package/build/testDoubles/SnippetSuite/FakeSnippetSuite.js +3 -6
- package/build/testDoubles/SnippetSuite/FakeSnippetSuite.js.map +1 -1
- package/build/types.js +1 -2
- package/package.json +5 -3
- package/src/__tests__/AbstractAutomoduleTest.ts +5 -4
- package/src/__tests__/AbstractPackageTest.ts +4 -3
- package/src/__tests__/impl/GitAutocloner.test.ts +4 -3
- package/src/__tests__/impl/ImplAutomodule.test.ts +5 -4
- package/src/__tests__/impl/NpmAutopackage.test.ts +31 -15
- package/src/__tests__/impl/PackageAutodocumenter.test.ts +4 -3
- package/src/__tests__/impl/TypescriptClassSnippetSuite.test.ts +4 -3
- package/src/__tests__/impl/UiAutomodule.test.ts +5 -4
- package/src/__tests__/impl/VscodeSnippetKeybinder.test.ts +4 -3
- package/src/impl/AbstractAutomodule.ts +2 -1
- package/src/impl/ImplAutomodule.ts +3 -3
- package/src/impl/NpmAutopackage.ts +4 -3
- package/src/impl/TypescriptClassSnippetSuite.ts +1 -1
- package/src/impl/UiAutomodule.ts +4 -3
- package/src/impl/VscodeSnippetKeybinder.ts +2 -1
- package/src/index.ts +28 -28
- package/src/scripts/installSnippetSuite.ts +1 -1
- package/src/scripts/runAutopackage.ts +2 -2
- package/src/scripts/runImplAutomodule.ts +2 -2
- package/src/scripts/runSnippetKeybinder.ts +1 -1
- package/src/scripts/runUiAutomodule.ts +2 -2
- package/src/testDoubles/Autocloner/FakeAutocloner.ts +1 -1
- package/src/testDoubles/Autodocumenter/FakeAutodocumenter.ts +1 -1
- package/src/testDoubles/Automodule/FakeAutomodule.ts +3 -3
- package/src/testDoubles/Autopackage/FakeAutopackage.ts +1 -1
- package/src/testDoubles/SnippetKeybinder/FakeSnippetKeybinder.ts +1 -1
- package/src/testDoubles/SnippetSuite/FakeSnippetSuite.ts +1 -1
- package/tsconfig.json +17 -28
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
class PackageAutodocumenter {
|
|
1
|
+
export default class PackageAutodocumenter {
|
|
2
|
+
static Class;
|
|
4
3
|
constructor() { }
|
|
5
4
|
static Create() {
|
|
6
5
|
return new (this.Class ?? this)();
|
|
7
6
|
}
|
|
8
7
|
}
|
|
9
|
-
exports.default = PackageAutodocumenter;
|
|
10
8
|
//# sourceMappingURL=PackageAutodocumenter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PackageAutodocumenter.js","sourceRoot":"","sources":["../../src/impl/PackageAutodocumenter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PackageAutodocumenter.js","sourceRoot":"","sources":["../../src/impl/PackageAutodocumenter.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,qBAAqB;IAC/B,MAAM,CAAC,KAAK,CAA4B;IAE/C,gBAAyB,CAAC;IAEnB,MAAM,CAAC,MAAM;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,EAAE,CAAA;IACrC,CAAC;CACJ"}
|
|
@@ -1,18 +1,119 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
constructor() {
|
|
10
|
-
|
|
11
|
-
this.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
this.
|
|
15
|
-
this.
|
|
1
|
+
import { readFile, writeFile } from 'fs/promises';
|
|
2
|
+
import expandHomeDir from '../functions/expandHomeDir.js';
|
|
3
|
+
export default class TypescriptClassSnippetSuite {
|
|
4
|
+
static Class;
|
|
5
|
+
static readFile = readFile;
|
|
6
|
+
static writeFile = writeFile;
|
|
7
|
+
originalSnippetsFile;
|
|
8
|
+
originalKeybindingsFile;
|
|
9
|
+
constructor() { }
|
|
10
|
+
static Create() {
|
|
11
|
+
return new (this.Class ?? this)();
|
|
12
|
+
}
|
|
13
|
+
async install() {
|
|
14
|
+
await this.installGlobalSnippets();
|
|
15
|
+
await this.installGlobalKeybindings();
|
|
16
|
+
}
|
|
17
|
+
async installGlobalSnippets() {
|
|
18
|
+
this.originalSnippetsFile = await this.loadSnippetsFile();
|
|
19
|
+
if (!this.hasSnippetMarkers) {
|
|
20
|
+
await this.installFreshSnippets();
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
await this.updateExistingSnippets();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
async loadSnippetsFile() {
|
|
27
|
+
return await this.readFile(this.snippetsPath, 'utf-8');
|
|
28
|
+
}
|
|
29
|
+
get snippetsPath() {
|
|
30
|
+
return `${this.vscodeDir}/snippets/custom.code-snippets`;
|
|
31
|
+
}
|
|
32
|
+
vscodeDir = expandHomeDir('~/Library/Application Support/Code/User');
|
|
33
|
+
get hasSnippetMarkers() {
|
|
34
|
+
return this.snippetStartIdx !== -1 && this.snippetEndIdx !== -1;
|
|
35
|
+
}
|
|
36
|
+
get snippetStartIdx() {
|
|
37
|
+
return this.originalSnippetsFile.indexOf(this.snippetStartMarker);
|
|
38
|
+
}
|
|
39
|
+
snippetStartMarker = '// === TYPESCRIPT CLASS SNIPPETS BEGIN ===';
|
|
40
|
+
get snippetEndIdx() {
|
|
41
|
+
return (this.originalSnippetsFile.indexOf(this.snippetEndMarker) +
|
|
42
|
+
this.snippetEndMarker.length);
|
|
43
|
+
}
|
|
44
|
+
snippetEndMarker = '// === TYPESCRIPT CLASS SNIPPETS END ===';
|
|
45
|
+
async installFreshSnippets() {
|
|
46
|
+
await this.writeFile(this.snippetsPath, this.freshSnippetsFile);
|
|
47
|
+
}
|
|
48
|
+
get freshSnippetsFile() {
|
|
49
|
+
const lastBraceIdx = this.originalSnippetsFile.lastIndexOf('}');
|
|
50
|
+
const before = this.originalSnippetsFile.slice(0, lastBraceIdx);
|
|
51
|
+
return `${before}${this.snippetsBlock}\n}`;
|
|
52
|
+
}
|
|
53
|
+
get snippetsBlock() {
|
|
54
|
+
return ` ${this.snippetStartMarker}\n${this.indentedSnippets}\n ${this.snippetEndMarker}`;
|
|
55
|
+
}
|
|
56
|
+
async updateExistingSnippets() {
|
|
57
|
+
const before = this.originalSnippetsFile.slice(0, this.snippetStartIdx);
|
|
58
|
+
const existing = this.originalSnippetsFile.slice(this.snippetStartIdx, this.snippetEndIdx);
|
|
59
|
+
const after = this.originalSnippetsFile.slice(this.snippetEndIdx);
|
|
60
|
+
if (existing.trim() !== this.snippetsBlock.trim()) {
|
|
61
|
+
await this.writeFile(this.snippetsPath, `${before}${this.snippetsBlock}${after}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async installGlobalKeybindings() {
|
|
65
|
+
this.originalKeybindingsFile = await this.loadKeybindingsFile();
|
|
66
|
+
if (!this.hasKeybindMarkers) {
|
|
67
|
+
await this.installFreshKeybindings();
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
await this.updateExistingKeybindings();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
async loadKeybindingsFile() {
|
|
74
|
+
return await this.readFile(this.keybindingsPath, 'utf-8');
|
|
75
|
+
}
|
|
76
|
+
get keybindingsPath() {
|
|
77
|
+
return `${this.vscodeDir}/keybindings.json`;
|
|
78
|
+
}
|
|
79
|
+
get hasKeybindMarkers() {
|
|
80
|
+
return this.keybindStartIdx !== -1 && this.keybindEndIdx !== -1;
|
|
81
|
+
}
|
|
82
|
+
get keybindStartIdx() {
|
|
83
|
+
return this.originalKeybindingsFile.indexOf(this.keybindStartMarker);
|
|
84
|
+
}
|
|
85
|
+
get keybindEndIdx() {
|
|
86
|
+
return (this.originalKeybindingsFile.indexOf(this.keybindEndMarker) +
|
|
87
|
+
this.keybindEndMarker.length);
|
|
88
|
+
}
|
|
89
|
+
async installFreshKeybindings() {
|
|
90
|
+
await this.writeFile(this.keybindingsPath, this.freshKeybindingsFile);
|
|
91
|
+
}
|
|
92
|
+
get freshKeybindingsFile() {
|
|
93
|
+
const lastBraceIdx = this.originalKeybindingsFile.lastIndexOf(']');
|
|
94
|
+
const before = this.originalKeybindingsFile.slice(0, lastBraceIdx);
|
|
95
|
+
return `${before}${this.keybindingBlock}\n]`;
|
|
96
|
+
}
|
|
97
|
+
get keybindingBlock() {
|
|
98
|
+
return ` ${this.keybindStartMarker}\n${this.indentedKeybindings}\n ${this.keybindEndMarker}`;
|
|
99
|
+
}
|
|
100
|
+
keybindStartMarker = '// === TYPESCRIPT CLASS KEYBINDINGS BEGIN ===';
|
|
101
|
+
keybindEndMarker = '// === TYPESCRIPT CLASS KEYBINDINGS END ===';
|
|
102
|
+
async updateExistingKeybindings() {
|
|
103
|
+
const before = this.originalKeybindingsFile.slice(0, this.keybindStartIdx);
|
|
104
|
+
const existing = this.originalKeybindingsFile.slice(this.keybindStartIdx, this.keybindEndIdx);
|
|
105
|
+
const after = this.originalKeybindingsFile.slice(this.keybindEndIdx);
|
|
106
|
+
if (existing.trim() !== this.keybindingBlock.trim()) {
|
|
107
|
+
await this.writeFile(this.keybindingsPath, `${before}${this.keybindingBlock}${after}`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
get readFile() {
|
|
111
|
+
return TypescriptClassSnippetSuite.readFile;
|
|
112
|
+
}
|
|
113
|
+
get writeFile() {
|
|
114
|
+
return TypescriptClassSnippetSuite.writeFile;
|
|
115
|
+
}
|
|
116
|
+
snippets = `
|
|
16
117
|
// === PUBLIC ===
|
|
17
118
|
"Public constructor": { "scope": "typescript,typescriptreact", "prefix": "public.constructor", "body": ["public constructor(\${1:}) {\${2:} }"] },
|
|
18
119
|
"Public field": { "scope": "typescript,typescriptreact", "prefix": "public.field", "body": ["public \${1:newField} = \${2:undefined}"] },
|
|
@@ -67,11 +168,11 @@ class TypescriptClassSnippetSuite {
|
|
|
67
168
|
"Private static method": { "scope": "typescript,typescriptreact", "prefix": "private.static.method", "body": ["private static \${1:newMethod}(\${2:}): \${3:void} {\${4:} }"] },
|
|
68
169
|
"Private static async method": { "scope": "typescript,typescriptreact", "prefix": "private.static.async.method", "body": ["private static async \${1:newMethod}(\${2:}): \${3:Promise<unknown>} {\${4:} }"] }
|
|
69
170
|
`.replace(/^[ \t]+/gm, '');
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
171
|
+
indentedSnippets = this.snippets
|
|
172
|
+
.split('\n')
|
|
173
|
+
.map((line) => (line.trim() ? ' ' + line : line))
|
|
174
|
+
.join('\n');
|
|
175
|
+
keybindings = `
|
|
75
176
|
// === PUBLIC (Ctrl+1) ===
|
|
76
177
|
{ "key": "ctrl+1 f1", "command": "editor.action.insertSnippet", "args": { "name": "Public constructor" } },
|
|
77
178
|
{ "key": "ctrl+1 f2", "command": "editor.action.insertSnippet", "args": { "name": "Public field" } },
|
|
@@ -126,114 +227,9 @@ class TypescriptClassSnippetSuite {
|
|
|
126
227
|
{ "key": "ctrl+3 alt+f6", "command": "editor.action.insertSnippet", "args": { "name": "Private static method" } },
|
|
127
228
|
{ "key": "ctrl+3 alt+f7", "command": "editor.action.insertSnippet", "args": { "name": "Private static async method" } }
|
|
128
229
|
`.replace(/^[ \t]+/gm, '');
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
static Create() {
|
|
135
|
-
return new (this.Class ?? this)();
|
|
136
|
-
}
|
|
137
|
-
async install() {
|
|
138
|
-
await this.installGlobalSnippets();
|
|
139
|
-
await this.installGlobalKeybindings();
|
|
140
|
-
}
|
|
141
|
-
async installGlobalSnippets() {
|
|
142
|
-
this.originalSnippetsFile = await this.loadSnippetsFile();
|
|
143
|
-
if (!this.hasSnippetMarkers) {
|
|
144
|
-
await this.installFreshSnippets();
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
await this.updateExistingSnippets();
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
async loadSnippetsFile() {
|
|
151
|
-
return await this.readFile(this.snippetsPath, 'utf-8');
|
|
152
|
-
}
|
|
153
|
-
get snippetsPath() {
|
|
154
|
-
return `${this.vscodeDir}/snippets/custom.code-snippets`;
|
|
155
|
-
}
|
|
156
|
-
get hasSnippetMarkers() {
|
|
157
|
-
return this.snippetStartIdx !== -1 && this.snippetEndIdx !== -1;
|
|
158
|
-
}
|
|
159
|
-
get snippetStartIdx() {
|
|
160
|
-
return this.originalSnippetsFile.indexOf(this.snippetStartMarker);
|
|
161
|
-
}
|
|
162
|
-
get snippetEndIdx() {
|
|
163
|
-
return (this.originalSnippetsFile.indexOf(this.snippetEndMarker) +
|
|
164
|
-
this.snippetEndMarker.length);
|
|
165
|
-
}
|
|
166
|
-
async installFreshSnippets() {
|
|
167
|
-
await this.writeFile(this.snippetsPath, this.freshSnippetsFile);
|
|
168
|
-
}
|
|
169
|
-
get freshSnippetsFile() {
|
|
170
|
-
const lastBraceIdx = this.originalSnippetsFile.lastIndexOf('}');
|
|
171
|
-
const before = this.originalSnippetsFile.slice(0, lastBraceIdx);
|
|
172
|
-
return `${before}${this.snippetsBlock}\n}`;
|
|
173
|
-
}
|
|
174
|
-
get snippetsBlock() {
|
|
175
|
-
return ` ${this.snippetStartMarker}\n${this.indentedSnippets}\n ${this.snippetEndMarker}`;
|
|
176
|
-
}
|
|
177
|
-
async updateExistingSnippets() {
|
|
178
|
-
const before = this.originalSnippetsFile.slice(0, this.snippetStartIdx);
|
|
179
|
-
const existing = this.originalSnippetsFile.slice(this.snippetStartIdx, this.snippetEndIdx);
|
|
180
|
-
const after = this.originalSnippetsFile.slice(this.snippetEndIdx);
|
|
181
|
-
if (existing.trim() !== this.snippetsBlock.trim()) {
|
|
182
|
-
await this.writeFile(this.snippetsPath, `${before}${this.snippetsBlock}${after}`);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
async installGlobalKeybindings() {
|
|
186
|
-
this.originalKeybindingsFile = await this.loadKeybindingsFile();
|
|
187
|
-
if (!this.hasKeybindMarkers) {
|
|
188
|
-
await this.installFreshKeybindings();
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
await this.updateExistingKeybindings();
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
async loadKeybindingsFile() {
|
|
195
|
-
return await this.readFile(this.keybindingsPath, 'utf-8');
|
|
196
|
-
}
|
|
197
|
-
get keybindingsPath() {
|
|
198
|
-
return `${this.vscodeDir}/keybindings.json`;
|
|
199
|
-
}
|
|
200
|
-
get hasKeybindMarkers() {
|
|
201
|
-
return this.keybindStartIdx !== -1 && this.keybindEndIdx !== -1;
|
|
202
|
-
}
|
|
203
|
-
get keybindStartIdx() {
|
|
204
|
-
return this.originalKeybindingsFile.indexOf(this.keybindStartMarker);
|
|
205
|
-
}
|
|
206
|
-
get keybindEndIdx() {
|
|
207
|
-
return (this.originalKeybindingsFile.indexOf(this.keybindEndMarker) +
|
|
208
|
-
this.keybindEndMarker.length);
|
|
209
|
-
}
|
|
210
|
-
async installFreshKeybindings() {
|
|
211
|
-
await this.writeFile(this.keybindingsPath, this.freshKeybindingsFile);
|
|
212
|
-
}
|
|
213
|
-
get freshKeybindingsFile() {
|
|
214
|
-
const lastBraceIdx = this.originalKeybindingsFile.lastIndexOf(']');
|
|
215
|
-
const before = this.originalKeybindingsFile.slice(0, lastBraceIdx);
|
|
216
|
-
return `${before}${this.keybindingBlock}\n]`;
|
|
217
|
-
}
|
|
218
|
-
get keybindingBlock() {
|
|
219
|
-
return ` ${this.keybindStartMarker}\n${this.indentedKeybindings}\n ${this.keybindEndMarker}`;
|
|
220
|
-
}
|
|
221
|
-
async updateExistingKeybindings() {
|
|
222
|
-
const before = this.originalKeybindingsFile.slice(0, this.keybindStartIdx);
|
|
223
|
-
const existing = this.originalKeybindingsFile.slice(this.keybindStartIdx, this.keybindEndIdx);
|
|
224
|
-
const after = this.originalKeybindingsFile.slice(this.keybindEndIdx);
|
|
225
|
-
if (existing.trim() !== this.keybindingBlock.trim()) {
|
|
226
|
-
await this.writeFile(this.keybindingsPath, `${before}${this.keybindingBlock}${after}`);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
get readFile() {
|
|
230
|
-
return TypescriptClassSnippetSuite.readFile;
|
|
231
|
-
}
|
|
232
|
-
get writeFile() {
|
|
233
|
-
return TypescriptClassSnippetSuite.writeFile;
|
|
234
|
-
}
|
|
230
|
+
indentedKeybindings = this.keybindings
|
|
231
|
+
.split('\n')
|
|
232
|
+
.map((line) => (line.trim() ? ' ' + line : line))
|
|
233
|
+
.join('\n');
|
|
235
234
|
}
|
|
236
|
-
TypescriptClassSnippetSuite.readFile = promises_1.readFile;
|
|
237
|
-
TypescriptClassSnippetSuite.writeFile = promises_1.writeFile;
|
|
238
|
-
exports.default = TypescriptClassSnippetSuite;
|
|
239
235
|
//# sourceMappingURL=TypescriptClassSnippetSuite.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypescriptClassSnippetSuite.js","sourceRoot":"","sources":["../../src/impl/TypescriptClassSnippetSuite.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TypescriptClassSnippetSuite.js","sourceRoot":"","sources":["../../src/impl/TypescriptClassSnippetSuite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAA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;;;;;;;;;;;;;;;;;;;;;;;;KAsD3B,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;IAET,gBAAgB,GAAG,IAAI,CAAC,QAAQ;SAC5C,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;SACnD,IAAI,CAAC,IAAI,CAAC,CAAA;IAEE,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsD9B,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;IAET,mBAAmB,GAAG,IAAI,CAAC,WAAW;SAClD,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;SACnD,IAAI,CAAC,IAAI,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { pathExists } from 'fs-extra';
|
|
2
|
-
import { Automodule, BaseAutomoduleOptions } from '../types';
|
|
3
|
-
import AbstractAutomodule from './AbstractAutomodule';
|
|
2
|
+
import { Automodule, BaseAutomoduleOptions } from '../types.js';
|
|
3
|
+
import AbstractAutomodule from './AbstractAutomodule.js';
|
|
4
4
|
export default class UiAutomodule extends AbstractAutomodule {
|
|
5
5
|
static Class?: UiAutomoduleConstructor;
|
|
6
6
|
static pathExists: typeof pathExists;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class UiAutomodule extends AbstractAutomodule_1.default {
|
|
1
|
+
import { pathExists } from 'fs-extra';
|
|
2
|
+
import AbstractAutomodule from './AbstractAutomodule.js';
|
|
3
|
+
export default class UiAutomodule extends AbstractAutomodule {
|
|
4
|
+
static Class;
|
|
5
|
+
static pathExists = pathExists;
|
|
6
|
+
componentName;
|
|
7
|
+
componentNameKebabCase;
|
|
9
8
|
constructor(options) {
|
|
10
9
|
const { testSaveDir, moduleSaveDir, fakeSaveDir, componentName } = options;
|
|
11
10
|
super({
|
|
@@ -41,7 +40,7 @@ class UiAutomodule extends AbstractAutomodule_1.default {
|
|
|
41
40
|
}
|
|
42
41
|
get testFileTemplate() {
|
|
43
42
|
return `
|
|
44
|
-
import { test, assert } from '@
|
|
43
|
+
import { test, assert } from '@neurodevs/node-tdd'
|
|
45
44
|
import { render, RenderResult } from '@testing-library/react'
|
|
46
45
|
import ${this.componentName} from '../../ui/${this.componentName}'
|
|
47
46
|
import AbstractPackageTest from '../AbstractPackageTest'
|
|
@@ -136,6 +135,4 @@ class UiAutomodule extends AbstractAutomodule_1.default {
|
|
|
136
135
|
`;
|
|
137
136
|
}
|
|
138
137
|
}
|
|
139
|
-
UiAutomodule.pathExists = fs_extra_1.pathExists;
|
|
140
|
-
exports.default = UiAutomodule;
|
|
141
138
|
//# sourceMappingURL=UiAutomodule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiAutomodule.js","sourceRoot":"","sources":["../../src/impl/UiAutomodule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UiAutomodule.js","sourceRoot":"","sources":["../../src/impl/UiAutomodule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAGrC,OAAO,kBAAkB,MAAM,yBAAyB,CAAA;AAExD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,kBAAkB;IACjD,MAAM,CAAC,KAAK,CAA0B;IACtC,MAAM,CAAC,UAAU,GAAG,UAAU,CAAA;IAE3B,aAAa,CAAQ;IACr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Dir.js';
|
|
4
|
+
export default class VscodeSnippetKeybinder {
|
|
5
|
+
static Class;
|
|
6
|
+
static readFile = readFile;
|
|
7
|
+
static writeFile = writeFile;
|
|
8
|
+
name;
|
|
9
|
+
description;
|
|
10
|
+
lines;
|
|
11
|
+
keybinding;
|
|
10
12
|
constructor(options) {
|
|
11
|
-
this.vscodeDir = (0, expandHomeDir_1.default)('~/Library/Application Support/Code/User');
|
|
12
|
-
this.snippetsPath = `${this.vscodeDir}/snippets/custom.code-snippets`;
|
|
13
|
-
this.keybindingsPath = `${this.vscodeDir}/keybindings.json`;
|
|
14
13
|
const { name, description, lines, keybinding } = options;
|
|
15
14
|
this.name = name;
|
|
16
15
|
this.description = description;
|
|
@@ -26,7 +25,7 @@ class VscodeSnippetKeybinder {
|
|
|
26
25
|
}
|
|
27
26
|
async updateGlobalSnippets() {
|
|
28
27
|
const raw = await this.readFile(this.snippetsPath, 'utf-8');
|
|
29
|
-
const snippets =
|
|
28
|
+
const snippets = parse(raw);
|
|
30
29
|
const updated = {
|
|
31
30
|
...snippets,
|
|
32
31
|
[this.name]: {
|
|
@@ -38,6 +37,8 @@ class VscodeSnippetKeybinder {
|
|
|
38
37
|
};
|
|
39
38
|
await this.writeFile(this.snippetsPath, JSON.stringify(updated, null, 4));
|
|
40
39
|
}
|
|
40
|
+
vscodeDir = expandHomeDir('~/Library/Application Support/Code/User');
|
|
41
|
+
snippetsPath = `${this.vscodeDir}/snippets/custom.code-snippets`;
|
|
41
42
|
toCommandId(name) {
|
|
42
43
|
return name
|
|
43
44
|
.trim()
|
|
@@ -49,7 +50,7 @@ class VscodeSnippetKeybinder {
|
|
|
49
50
|
}
|
|
50
51
|
async updateGlobalKeybindings() {
|
|
51
52
|
const raw = await this.readFile(this.keybindingsPath, 'utf-8');
|
|
52
|
-
const keybindings =
|
|
53
|
+
const keybindings = parse(raw);
|
|
53
54
|
const updated = [
|
|
54
55
|
...keybindings,
|
|
55
56
|
{
|
|
@@ -63,6 +64,7 @@ class VscodeSnippetKeybinder {
|
|
|
63
64
|
];
|
|
64
65
|
await this.writeFile(this.keybindingsPath, JSON.stringify(updated, null, 4));
|
|
65
66
|
}
|
|
67
|
+
keybindingsPath = `${this.vscodeDir}/keybindings.json`;
|
|
66
68
|
get readFile() {
|
|
67
69
|
return VscodeSnippetKeybinder.readFile;
|
|
68
70
|
}
|
|
@@ -70,7 +72,4 @@ class VscodeSnippetKeybinder {
|
|
|
70
72
|
return VscodeSnippetKeybinder.writeFile;
|
|
71
73
|
}
|
|
72
74
|
}
|
|
73
|
-
VscodeSnippetKeybinder.readFile = promises_1.readFile;
|
|
74
|
-
VscodeSnippetKeybinder.writeFile = promises_1.writeFile;
|
|
75
|
-
exports.default = VscodeSnippetKeybinder;
|
|
76
75
|
//# sourceMappingURL=VscodeSnippetKeybinder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VscodeSnippetKeybinder.js","sourceRoot":"","sources":["../../src/impl/VscodeSnippetKeybinder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VscodeSnippetKeybinder.js","sourceRoot":"","sources":["../../src/impl/VscodeSnippetKeybinder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAEpC,OAAO,aAAa,MAAM,+BAA+B,CAAA;AAEzD,MAAM,CAAC,OAAO,OAAO,sBAAsB;IAChC,MAAM,CAAC,KAAK,CAA8B;IAC1C,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,MAAM,CAAC,SAAS,GAAG,SAAS,CAAA;IAE3B,IAAI,CAAQ;IACZ,WAAW,CAAQ;IACnB,KAAK,CAAU;IACf,UAAU,CAAQ;IAE1B,YAAsB,OAAgC;QAClD,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,OAAO,CAAA;QAEx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,CAAC,UAAU,EAAE,GAAG,CAAC;aACxB,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC;aAC1B,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;aACpB,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAA;IAClC,CAAC;IAEO,KAAK,CAAC,uBAAuB;QACjC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAA;QAC9D,MAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,CAAA;QAE9B,MAAM,OAAO,GAAG;YACZ,GAAG,WAAW;YACd;gBACI,GAAG,EAAE,IAAI,CAAC,UAAU;gBACpB,OAAO,EAAE,6BAA6B;gBACtC,IAAI,EAAE,iBAAiB;gBACvB,IAAI,EAAE;oBACF,IAAI,EAAE,IAAI,CAAC,IAAI;iBAClB;aACJ;SACJ,CAAA;QAED,MAAM,IAAI,CAAC,SAAS,CAChB,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CACnC,CAAA;IACL,CAAC;IAEgB,eAAe,GAAG,GAAG,IAAI,CAAC,SAAS,mBAAmB,CAAA;IAEvE,IAAY,QAAQ;QAChB,OAAO,sBAAsB,CAAC,QAAQ,CAAA;IAC1C,CAAC;IAED,IAAY,SAAS;QACjB,OAAO,sBAAsB,CAAC,SAAS,CAAA;IAC3C,CAAC"}
|
package/build/index.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
export { default as GitAutocloner } from './impl/GitAutocloner';
|
|
2
|
-
export * from './impl/GitAutocloner';
|
|
3
|
-
export { default as FakeAutocloner } from './testDoubles/Autocloner/FakeAutocloner';
|
|
4
|
-
export * from './testDoubles/Autocloner/FakeAutocloner';
|
|
5
|
-
export { default as PackageAutodocumenter } from './impl/PackageAutodocumenter';
|
|
6
|
-
export * from './impl/PackageAutodocumenter';
|
|
7
|
-
export { default as FakeAutodocumenter } from './testDoubles/Autodocumenter/FakeAutodocumenter';
|
|
8
|
-
export * from './testDoubles/Autodocumenter/FakeAutodocumenter';
|
|
9
|
-
export { default as AbstractAutomodule } from './impl/AbstractAutomodule';
|
|
10
|
-
export * from './impl/AbstractAutomodule';
|
|
11
|
-
export { default as ImplAutomodule } from './impl/ImplAutomodule';
|
|
12
|
-
export * from './impl/ImplAutomodule';
|
|
13
|
-
export { default as UiAutomodule } from './impl/UiAutomodule';
|
|
14
|
-
export * from './impl/UiAutomodule';
|
|
15
|
-
export { default as FakeAutomodule } from './testDoubles/Automodule/FakeAutomodule';
|
|
16
|
-
export * from './testDoubles/Automodule/FakeAutomodule';
|
|
17
|
-
export { default as NpmAutopackage } from './impl/NpmAutopackage';
|
|
18
|
-
export * from './impl/NpmAutopackage';
|
|
19
|
-
export { default as FakeAutopackage } from './testDoubles/Autopackage/FakeAutopackage';
|
|
20
|
-
export * from './testDoubles/Autopackage/FakeAutopackage';
|
|
21
|
-
export { default as VscodeSnippetKeybinder } from './impl/VscodeSnippetKeybinder';
|
|
22
|
-
export * from './impl/VscodeSnippetKeybinder';
|
|
23
|
-
export { default as FakeSnippetKeybinder } from './testDoubles/SnippetKeybinder/FakeSnippetKeybinder';
|
|
24
|
-
export * from './testDoubles/SnippetKeybinder/FakeSnippetKeybinder';
|
|
25
|
-
export { default as TypescriptClassSnippetSuite } from './impl/TypescriptClassSnippetSuite';
|
|
26
|
-
export * from './impl/TypescriptClassSnippetSuite';
|
|
27
|
-
export { default as FakeSnippetSuite } from './testDoubles/SnippetSuite/FakeSnippetSuite';
|
|
28
|
-
export * from './testDoubles/SnippetSuite/FakeSnippetSuite';
|
|
1
|
+
export { default as GitAutocloner } from './impl/GitAutocloner.js';
|
|
2
|
+
export * from './impl/GitAutocloner.js';
|
|
3
|
+
export { default as FakeAutocloner } from './testDoubles/Autocloner/FakeAutocloner.js';
|
|
4
|
+
export * from './testDoubles/Autocloner/FakeAutocloner.js';
|
|
5
|
+
export { default as PackageAutodocumenter } from './impl/PackageAutodocumenter.js';
|
|
6
|
+
export * from './impl/PackageAutodocumenter.js';
|
|
7
|
+
export { default as FakeAutodocumenter } from './testDoubles/Autodocumenter/FakeAutodocumenter.js';
|
|
8
|
+
export * from './testDoubles/Autodocumenter/FakeAutodocumenter.js';
|
|
9
|
+
export { default as AbstractAutomodule } from './impl/AbstractAutomodule.js';
|
|
10
|
+
export * from './impl/AbstractAutomodule.js';
|
|
11
|
+
export { default as ImplAutomodule } from './impl/ImplAutomodule.js';
|
|
12
|
+
export * from './impl/ImplAutomodule.js';
|
|
13
|
+
export { default as UiAutomodule } from './impl/UiAutomodule.js';
|
|
14
|
+
export * from './impl/UiAutomodule.js';
|
|
15
|
+
export { default as FakeAutomodule } from './testDoubles/Automodule/FakeAutomodule.js';
|
|
16
|
+
export * from './testDoubles/Automodule/FakeAutomodule.js';
|
|
17
|
+
export { default as NpmAutopackage } from './impl/NpmAutopackage.js';
|
|
18
|
+
export * from './impl/NpmAutopackage.js';
|
|
19
|
+
export { default as FakeAutopackage } from './testDoubles/Autopackage/FakeAutopackage.js';
|
|
20
|
+
export * from './testDoubles/Autopackage/FakeAutopackage.js';
|
|
21
|
+
export { default as VscodeSnippetKeybinder } from './impl/VscodeSnippetKeybinder.js';
|
|
22
|
+
export * from './impl/VscodeSnippetKeybinder.js';
|
|
23
|
+
export { default as FakeSnippetKeybinder } from './testDoubles/SnippetKeybinder/FakeSnippetKeybinder.js';
|
|
24
|
+
export * from './testDoubles/SnippetKeybinder/FakeSnippetKeybinder.js';
|
|
25
|
+
export { default as TypescriptClassSnippetSuite } from './impl/TypescriptClassSnippetSuite.js';
|
|
26
|
+
export * from './impl/TypescriptClassSnippetSuite.js';
|
|
27
|
+
export { default as FakeSnippetSuite } from './testDoubles/SnippetSuite/FakeSnippetSuite.js';
|
|
28
|
+
export * from './testDoubles/SnippetSuite/FakeSnippetSuite.js';
|
package/build/index.js
CHANGED
|
@@ -1,69 +1,35 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Autocloner
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
-
};
|
|
17
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.FakeSnippetSuite = exports.TypescriptClassSnippetSuite = exports.FakeSnippetKeybinder = exports.VscodeSnippetKeybinder = exports.FakeAutopackage = exports.NpmAutopackage = exports.FakeAutomodule = exports.UiAutomodule = exports.ImplAutomodule = exports.AbstractAutomodule = exports.FakeAutodocumenter = exports.PackageAutodocumenter = exports.FakeAutocloner = exports.GitAutocloner = void 0;
|
|
22
|
-
var GitAutocloner_1 = require("./impl/GitAutocloner");
|
|
23
|
-
Object.defineProperty(exports, "GitAutocloner", { enumerable: true, get: function () { return __importDefault(GitAutocloner_1).default; } });
|
|
24
|
-
__exportStar(require("./impl/GitAutocloner"), exports);
|
|
25
|
-
var FakeAutocloner_1 = require("./testDoubles/Autocloner/FakeAutocloner");
|
|
26
|
-
Object.defineProperty(exports, "FakeAutocloner", { enumerable: true, get: function () { return __importDefault(FakeAutocloner_1).default; } });
|
|
27
|
-
__exportStar(require("./testDoubles/Autocloner/FakeAutocloner"), exports);
|
|
2
|
+
export { default as GitAutocloner } from './impl/GitAutocloner.js';
|
|
3
|
+
export * from './impl/GitAutocloner.js';
|
|
4
|
+
export { default as FakeAutocloner } from './testDoubles/Autocloner/FakeAutocloner.js';
|
|
5
|
+
export * from './testDoubles/Autocloner/FakeAutocloner.js';
|
|
28
6
|
// Autodocumenter
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
Object.defineProperty(exports, "FakeAutodocumenter", { enumerable: true, get: function () { return __importDefault(FakeAutodocumenter_1).default; } });
|
|
34
|
-
__exportStar(require("./testDoubles/Autodocumenter/FakeAutodocumenter"), exports);
|
|
7
|
+
export { default as PackageAutodocumenter } from './impl/PackageAutodocumenter.js';
|
|
8
|
+
export * from './impl/PackageAutodocumenter.js';
|
|
9
|
+
export { default as FakeAutodocumenter } from './testDoubles/Autodocumenter/FakeAutodocumenter.js';
|
|
10
|
+
export * from './testDoubles/Autodocumenter/FakeAutodocumenter.js';
|
|
35
11
|
// Automodule
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
__exportStar(require("./impl/UiAutomodule"), exports);
|
|
45
|
-
var FakeAutomodule_1 = require("./testDoubles/Automodule/FakeAutomodule");
|
|
46
|
-
Object.defineProperty(exports, "FakeAutomodule", { enumerable: true, get: function () { return __importDefault(FakeAutomodule_1).default; } });
|
|
47
|
-
__exportStar(require("./testDoubles/Automodule/FakeAutomodule"), exports);
|
|
12
|
+
export { default as AbstractAutomodule } from './impl/AbstractAutomodule.js';
|
|
13
|
+
export * from './impl/AbstractAutomodule.js';
|
|
14
|
+
export { default as ImplAutomodule } from './impl/ImplAutomodule.js';
|
|
15
|
+
export * from './impl/ImplAutomodule.js';
|
|
16
|
+
export { default as UiAutomodule } from './impl/UiAutomodule.js';
|
|
17
|
+
export * from './impl/UiAutomodule.js';
|
|
18
|
+
export { default as FakeAutomodule } from './testDoubles/Automodule/FakeAutomodule.js';
|
|
19
|
+
export * from './testDoubles/Automodule/FakeAutomodule.js';
|
|
48
20
|
// Autopackage
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
Object.defineProperty(exports, "FakeAutopackage", { enumerable: true, get: function () { return __importDefault(FakeAutopackage_1).default; } });
|
|
54
|
-
__exportStar(require("./testDoubles/Autopackage/FakeAutopackage"), exports);
|
|
21
|
+
export { default as NpmAutopackage } from './impl/NpmAutopackage.js';
|
|
22
|
+
export * from './impl/NpmAutopackage.js';
|
|
23
|
+
export { default as FakeAutopackage } from './testDoubles/Autopackage/FakeAutopackage.js';
|
|
24
|
+
export * from './testDoubles/Autopackage/FakeAutopackage.js';
|
|
55
25
|
// SnippetKeybinder
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
Object.defineProperty(exports, "FakeSnippetKeybinder", { enumerable: true, get: function () { return __importDefault(FakeSnippetKeybinder_1).default; } });
|
|
61
|
-
__exportStar(require("./testDoubles/SnippetKeybinder/FakeSnippetKeybinder"), exports);
|
|
26
|
+
export { default as VscodeSnippetKeybinder } from './impl/VscodeSnippetKeybinder.js';
|
|
27
|
+
export * from './impl/VscodeSnippetKeybinder.js';
|
|
28
|
+
export { default as FakeSnippetKeybinder } from './testDoubles/SnippetKeybinder/FakeSnippetKeybinder.js';
|
|
29
|
+
export * from './testDoubles/SnippetKeybinder/FakeSnippetKeybinder.js';
|
|
62
30
|
// SnippetSuite
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
Object.defineProperty(exports, "FakeSnippetSuite", { enumerable: true, get: function () { return __importDefault(FakeSnippetSuite_1).default; } });
|
|
68
|
-
__exportStar(require("./testDoubles/SnippetSuite/FakeSnippetSuite"), exports);
|
|
31
|
+
export { default as TypescriptClassSnippetSuite } from './impl/TypescriptClassSnippetSuite.js';
|
|
32
|
+
export * from './impl/TypescriptClassSnippetSuite.js';
|
|
33
|
+
export { default as FakeSnippetSuite } from './testDoubles/SnippetSuite/FakeSnippetSuite.js';
|
|
34
|
+
export * from './testDoubles/SnippetSuite/FakeSnippetSuite.js';
|
|
69
35
|
//# sourceMappingURL=index.js.map
|