@ciderjs/gasnuki 0.3.4 → 0.3.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/README.ja.md +1 -1
- package/README.md +1 -1
- package/dist/cli.cjs +2 -2
- package/dist/cli.mjs +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/shared/{gasnuki.kBd1L15Q.cjs → gasnuki.Cam3UO_N.cjs} +19 -2
- package/dist/shared/{gasnuki.C96Q3amR.mjs → gasnuki.HyFJZts6.mjs} +19 -2
- package/dist/vite.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +1 -1
package/README.ja.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @ciderjs/gasnuki
|
|
2
2
|
|
|
3
3
|
[](./README.md)
|
|
4
|
-
[](https://github.com/luthpg/gasnuki)
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
[](https://www.npmjs.com/package/@ciderjs/gasnuki)
|
|
7
7
|
[](https://github.com/luthpg/gasnuki/issues)
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @ciderjs/gasnuki
|
|
2
2
|
|
|
3
3
|
[](./README.ja.md)
|
|
4
|
-
[](https://github.com/luthpg/gasnuki)
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
[](https://www.npmjs.com/package/@ciderjs/gasnuki)
|
|
7
7
|
[](https://github.com/luthpg/gasnuki/issues)
|
package/dist/cli.cjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
const path = require('node:path');
|
|
5
5
|
const commander = require('commander');
|
|
6
6
|
const index = require('./index.cjs');
|
|
7
|
-
const config = require('./shared/gasnuki.
|
|
7
|
+
const config = require('./shared/gasnuki.Cam3UO_N.cjs');
|
|
8
8
|
require('chokidar');
|
|
9
9
|
require('consola');
|
|
10
10
|
require('node:fs');
|
|
@@ -25,7 +25,7 @@ function _interopNamespaceCompat(e) {
|
|
|
25
25
|
|
|
26
26
|
const path__namespace = /*#__PURE__*/_interopNamespaceCompat(path);
|
|
27
27
|
|
|
28
|
-
const version = "0.3.
|
|
28
|
+
const version = "0.3.5";
|
|
29
29
|
|
|
30
30
|
const parseArgs = async (command) => {
|
|
31
31
|
const cliOpts = command.opts();
|
package/dist/cli.mjs
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import * as path from 'node:path';
|
|
3
3
|
import { Command } from 'commander';
|
|
4
4
|
import { generateTypes } from './index.mjs';
|
|
5
|
-
import { l as loadConfig } from './shared/gasnuki.
|
|
5
|
+
import { l as loadConfig } from './shared/gasnuki.HyFJZts6.mjs';
|
|
6
6
|
import 'chokidar';
|
|
7
7
|
import 'consola';
|
|
8
8
|
import 'node:fs';
|
|
9
9
|
import 'ts-morph';
|
|
10
10
|
import 'jiti';
|
|
11
11
|
|
|
12
|
-
const version = "0.3.
|
|
12
|
+
const version = "0.3.5";
|
|
13
13
|
|
|
14
14
|
const parseArgs = async (command) => {
|
|
15
15
|
const cliOpts = command.opts();
|
package/dist/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const path = require('node:path');
|
|
4
4
|
const chokidar = require('chokidar');
|
|
5
5
|
const consola = require('consola');
|
|
6
|
-
const config = require('./shared/gasnuki.
|
|
6
|
+
const config = require('./shared/gasnuki.Cam3UO_N.cjs');
|
|
7
7
|
require('node:fs');
|
|
8
8
|
require('ts-morph');
|
|
9
9
|
require('jiti');
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as path from 'node:path';
|
|
2
2
|
import * as chokidar from 'chokidar';
|
|
3
3
|
import { consola } from 'consola';
|
|
4
|
-
import { g as generateAppsScriptTypes } from './shared/gasnuki.
|
|
5
|
-
export { d as defineConfig } from './shared/gasnuki.
|
|
4
|
+
import { g as generateAppsScriptTypes } from './shared/gasnuki.HyFJZts6.mjs';
|
|
5
|
+
export { d as defineConfig } from './shared/gasnuki.HyFJZts6.mjs';
|
|
6
6
|
import 'node:fs';
|
|
7
7
|
import 'ts-morph';
|
|
8
8
|
import 'jiti';
|
|
@@ -165,7 +165,6 @@ const generateAppsScriptTypes = async ({
|
|
|
165
165
|
for (const typeArg of type.getAliasTypeArguments()) {
|
|
166
166
|
collectSymbolsFromType(typeArg, foundSymbols);
|
|
167
167
|
}
|
|
168
|
-
return;
|
|
169
168
|
}
|
|
170
169
|
const symbol = type.getSymbol();
|
|
171
170
|
if (symbol && !foundSymbols.has(symbol)) {
|
|
@@ -174,6 +173,18 @@ const generateAppsScriptTypes = async ({
|
|
|
174
173
|
for (const prop of type.getProperties()) {
|
|
175
174
|
const propDecl = prop.getDeclarations()[0];
|
|
176
175
|
if (propDecl) {
|
|
176
|
+
const compilerNode = propDecl.compilerNode;
|
|
177
|
+
if (
|
|
178
|
+
// @ts-expect-error - avoiding full type checks for perf, checking kind directly
|
|
179
|
+
compilerNode.name && // @ts-expect-error - avoiding full type checks for perf, checking kind directly
|
|
180
|
+
compilerNode.name.kind === tsMorph.SyntaxKind.ComputedPropertyName
|
|
181
|
+
) {
|
|
182
|
+
const expression = propDecl.getNameNode().getExpression();
|
|
183
|
+
const symbol2 = expression.getSymbol();
|
|
184
|
+
if (symbol2 && !foundSymbols.has(symbol2)) {
|
|
185
|
+
foundSymbols.add(symbol2);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
177
188
|
collectSymbolsFromType(propDecl.getType(), foundSymbols);
|
|
178
189
|
}
|
|
179
190
|
}
|
|
@@ -269,7 +280,13 @@ const generateAppsScriptTypes = async ({
|
|
|
269
280
|
}
|
|
270
281
|
importsMap.get(modulePath)?.add(symbolName);
|
|
271
282
|
} else {
|
|
272
|
-
|
|
283
|
+
let declText = declaration.getText();
|
|
284
|
+
if (declaration.getKind() === tsMorph.SyntaxKind.VariableDeclaration) {
|
|
285
|
+
const variableStatement = declaration.getParent()?.getParent();
|
|
286
|
+
if (variableStatement && variableStatement.getKind() === tsMorph.SyntaxKind.VariableStatement) {
|
|
287
|
+
declText = variableStatement.getText();
|
|
288
|
+
}
|
|
289
|
+
}
|
|
273
290
|
inlineDefinitions.set(symbolName, declText);
|
|
274
291
|
}
|
|
275
292
|
for (const descendant of declaration.getDescendantsOfKind(
|
|
@@ -148,7 +148,6 @@ const generateAppsScriptTypes = async ({
|
|
|
148
148
|
for (const typeArg of type.getAliasTypeArguments()) {
|
|
149
149
|
collectSymbolsFromType(typeArg, foundSymbols);
|
|
150
150
|
}
|
|
151
|
-
return;
|
|
152
151
|
}
|
|
153
152
|
const symbol = type.getSymbol();
|
|
154
153
|
if (symbol && !foundSymbols.has(symbol)) {
|
|
@@ -157,6 +156,18 @@ const generateAppsScriptTypes = async ({
|
|
|
157
156
|
for (const prop of type.getProperties()) {
|
|
158
157
|
const propDecl = prop.getDeclarations()[0];
|
|
159
158
|
if (propDecl) {
|
|
159
|
+
const compilerNode = propDecl.compilerNode;
|
|
160
|
+
if (
|
|
161
|
+
// @ts-expect-error - avoiding full type checks for perf, checking kind directly
|
|
162
|
+
compilerNode.name && // @ts-expect-error - avoiding full type checks for perf, checking kind directly
|
|
163
|
+
compilerNode.name.kind === SyntaxKind.ComputedPropertyName
|
|
164
|
+
) {
|
|
165
|
+
const expression = propDecl.getNameNode().getExpression();
|
|
166
|
+
const symbol2 = expression.getSymbol();
|
|
167
|
+
if (symbol2 && !foundSymbols.has(symbol2)) {
|
|
168
|
+
foundSymbols.add(symbol2);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
160
171
|
collectSymbolsFromType(propDecl.getType(), foundSymbols);
|
|
161
172
|
}
|
|
162
173
|
}
|
|
@@ -252,7 +263,13 @@ const generateAppsScriptTypes = async ({
|
|
|
252
263
|
}
|
|
253
264
|
importsMap.get(modulePath)?.add(symbolName);
|
|
254
265
|
} else {
|
|
255
|
-
|
|
266
|
+
let declText = declaration.getText();
|
|
267
|
+
if (declaration.getKind() === SyntaxKind.VariableDeclaration) {
|
|
268
|
+
const variableStatement = declaration.getParent()?.getParent();
|
|
269
|
+
if (variableStatement && variableStatement.getKind() === SyntaxKind.VariableStatement) {
|
|
270
|
+
declText = variableStatement.getText();
|
|
271
|
+
}
|
|
272
|
+
}
|
|
256
273
|
inlineDefinitions.set(symbolName, declText);
|
|
257
274
|
}
|
|
258
275
|
for (const descendant of declaration.getDescendantsOfKind(
|
package/dist/vite.cjs
CHANGED
package/dist/vite.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as path from 'node:path';
|
|
2
2
|
import { consola } from 'consola';
|
|
3
|
-
import { l as loadConfig, g as generateAppsScriptTypes } from './shared/gasnuki.
|
|
3
|
+
import { l as loadConfig, g as generateAppsScriptTypes } from './shared/gasnuki.HyFJZts6.mjs';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'ts-morph';
|
|
6
6
|
import 'jiti';
|