@ciderjs/gasnuki 0.5.2 → 0.5.3
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.CYbD-wKI.mjs → gasnuki.BAmTBfMa.mjs} +11 -1
- package/dist/shared/{gasnuki.Clw_jH65.cjs → gasnuki.CDe7f-cZ.cjs} +10 -0
- package/dist/vite.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +4 -4
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
|

|
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
|

|
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.CDe7f-cZ.cjs');
|
|
8
8
|
require('chokidar');
|
|
9
9
|
require('consola');
|
|
10
10
|
require('node:crypto');
|
|
@@ -26,7 +26,7 @@ function _interopNamespaceCompat(e) {
|
|
|
26
26
|
|
|
27
27
|
const path__namespace = /*#__PURE__*/_interopNamespaceCompat(path);
|
|
28
28
|
|
|
29
|
-
const version = "0.5.
|
|
29
|
+
const version = "0.5.3";
|
|
30
30
|
|
|
31
31
|
const parseArgs = async (command) => {
|
|
32
32
|
const cliOpts = command.opts();
|
package/dist/cli.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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.BAmTBfMa.mjs';
|
|
6
6
|
import 'chokidar';
|
|
7
7
|
import 'consola';
|
|
8
8
|
import 'node:crypto';
|
|
@@ -10,7 +10,7 @@ import 'node:fs';
|
|
|
10
10
|
import 'ts-morph';
|
|
11
11
|
import 'jiti';
|
|
12
12
|
|
|
13
|
-
const version = "0.5.
|
|
13
|
+
const version = "0.5.3";
|
|
14
14
|
|
|
15
15
|
const parseArgs = async (command) => {
|
|
16
16
|
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.CDe7f-cZ.cjs');
|
|
7
7
|
require('node:crypto');
|
|
8
8
|
require('node:fs');
|
|
9
9
|
require('ts-morph');
|
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.BAmTBfMa.mjs';
|
|
5
|
+
export { d as defineConfig } from './shared/gasnuki.BAmTBfMa.mjs';
|
|
6
6
|
import 'node:crypto';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'ts-morph';
|
|
@@ -2,7 +2,7 @@ import * as crypto from 'node:crypto';
|
|
|
2
2
|
import * as fs from 'node:fs';
|
|
3
3
|
import * as path from 'node:path';
|
|
4
4
|
import { consola } from 'consola';
|
|
5
|
-
import { Project, SyntaxKind, SymbolFlags } from 'ts-morph';
|
|
5
|
+
import { Project, SyntaxKind, SymbolFlags, Node } from 'ts-morph';
|
|
6
6
|
import { createJiti } from 'jiti';
|
|
7
7
|
|
|
8
8
|
const text = "export type RemoveReturnType<T> = {\n [P in keyof T]: T[P] extends (...args: infer A) => any\n ? (...args: A) => void\n : T[P];\n};\n\ntype _AppsScriptRun = RemoveReturnType<ServerScripts> & {\n [key: string]: (...args: any[]) => any;\n withSuccessHandler: <T = string | number | boolean | undefined, U = any>(\n callback: (returnValues: T, userObject?: U) => void,\n ) => _AppsScriptRun;\n withFailureHandler: <U = any>(\n callback: (error: Error, userObject?: U) => void,\n ) => _AppsScriptRun;\n withUserObject: <U = any>(userObject: U) => _AppsScriptRun;\n};\n\ntype _AppsScriptHistoryFunction = (\n stateObject: object,\n params: object,\n hash: string,\n) => void;\n\ninterface _WebAppLocationType {\n hash: string;\n parameter: Record<string, string>;\n parameters: Record<string, string[]>;\n}\n\nexport declare interface GoogleClientSideApi {\n script: {\n run: _AppsScriptRun;\n url: {\n getLocation: (callback: (location: _WebAppLocationType) => void) => void;\n };\n history: {\n push: _AppsScriptHistoryFunction;\n replace: _AppsScriptHistoryFunction;\n setChangeHandler: (\n callback: (e: { state: object; location: _WebAppLocationType }) => void,\n ) => void;\n };\n };\n}\n\ndeclare global {\n const google: GoogleClientSideApi;\n}\n";
|
|
@@ -470,6 +470,16 @@ const generateAppsScriptTypes = async ({
|
|
|
470
470
|
if (!functionSignatureSymbols.has(symbol)) {
|
|
471
471
|
continue;
|
|
472
472
|
}
|
|
473
|
+
const hasExportModifier = sourceFile.getStatements().some((stmt) => {
|
|
474
|
+
if (Node.isExportable(stmt)) {
|
|
475
|
+
return stmt.isExported();
|
|
476
|
+
}
|
|
477
|
+
return false;
|
|
478
|
+
});
|
|
479
|
+
const isGlobal = sourceFile.getImportDeclarations().length === 0 && sourceFile.getExportDeclarations().length === 0 && sourceFile.getExportAssignments().length === 0 && !hasExportModifier;
|
|
480
|
+
if (isGlobal) {
|
|
481
|
+
continue;
|
|
482
|
+
}
|
|
473
483
|
const packageName = resolveNodeModuleSpecifier_(sourceFilePath);
|
|
474
484
|
if (packageName) {
|
|
475
485
|
processedSymbols.add(symbolName);
|
|
@@ -488,6 +488,16 @@ const generateAppsScriptTypes = async ({
|
|
|
488
488
|
if (!functionSignatureSymbols.has(symbol)) {
|
|
489
489
|
continue;
|
|
490
490
|
}
|
|
491
|
+
const hasExportModifier = sourceFile.getStatements().some((stmt) => {
|
|
492
|
+
if (tsMorph.Node.isExportable(stmt)) {
|
|
493
|
+
return stmt.isExported();
|
|
494
|
+
}
|
|
495
|
+
return false;
|
|
496
|
+
});
|
|
497
|
+
const isGlobal = sourceFile.getImportDeclarations().length === 0 && sourceFile.getExportDeclarations().length === 0 && sourceFile.getExportAssignments().length === 0 && !hasExportModifier;
|
|
498
|
+
if (isGlobal) {
|
|
499
|
+
continue;
|
|
500
|
+
}
|
|
491
501
|
const packageName = resolveNodeModuleSpecifier_(sourceFilePath);
|
|
492
502
|
if (packageName) {
|
|
493
503
|
processedSymbols.add(symbolName);
|
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.BAmTBfMa.mjs';
|
|
4
4
|
import 'node:crypto';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'ts-morph';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ciderjs/gasnuki",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"description": "Type definitions and utilities for Google Apps Script client-side API",
|
|
5
5
|
"main": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -68,12 +68,12 @@
|
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@biomejs/biome": "^2.3.11",
|
|
71
|
-
"@types/node": "^25.0.
|
|
72
|
-
"@vitest/coverage-v8": "4.0.
|
|
71
|
+
"@types/node": "^25.0.9",
|
|
72
|
+
"@vitest/coverage-v8": "4.0.17",
|
|
73
73
|
"typescript": "^5.9.3",
|
|
74
74
|
"unbuild": "^3.6.1",
|
|
75
75
|
"vite": "^7.3.1",
|
|
76
|
-
"vitest": "4.0.
|
|
76
|
+
"vitest": "4.0.17"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"vite": "^7"
|