@ciderjs/gasnuki 0.1.2 → 0.1.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/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
package/dist/cli.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -109,7 +109,7 @@ const generateAppsScriptTypes = async ({
|
|
|
109
109
|
for (const funcDecl of sourceFile.getFunctions()) {
|
|
110
110
|
if (!funcDecl.isAmbient()) {
|
|
111
111
|
const name = funcDecl.getName();
|
|
112
|
-
if (name != null) {
|
|
112
|
+
if (name != null && !name.endsWith("_")) {
|
|
113
113
|
methodDefinitions.push(getInterfaceMethodDefinition_(name, funcDecl));
|
|
114
114
|
}
|
|
115
115
|
}
|
|
@@ -119,7 +119,7 @@ const generateAppsScriptTypes = async ({
|
|
|
119
119
|
for (const varDecl of varStmt.getDeclarations()) {
|
|
120
120
|
const initializer = varDecl.getInitializer();
|
|
121
121
|
const varName = varDecl.getName();
|
|
122
|
-
if (initializer != null && (initializer.getKind() === tsMorph.SyntaxKind.ArrowFunction || initializer.getKind() === tsMorph.SyntaxKind.FunctionExpression)) {
|
|
122
|
+
if (initializer != null && (initializer.getKind() === tsMorph.SyntaxKind.ArrowFunction || initializer.getKind() === tsMorph.SyntaxKind.FunctionExpression) && !varName.endsWith("_")) {
|
|
123
123
|
methodDefinitions.push(
|
|
124
124
|
getInterfaceMethodDefinition_(
|
|
125
125
|
varName,
|
|
@@ -148,7 +148,7 @@ const generateAppsScriptTypes = async ({
|
|
|
148
148
|
const formattedMethods = methodDefinitions.map(
|
|
149
149
|
(method) => method.split("\n").map((line) => ` ${line}`).join("\n")
|
|
150
150
|
).join("\n\n");
|
|
151
|
-
outputContent += `export
|
|
151
|
+
outputContent += `export type ServerScripts = {
|
|
152
152
|
${formattedMethods}
|
|
153
153
|
}
|
|
154
154
|
`;
|
|
@@ -156,7 +156,7 @@ ${formattedMethods}
|
|
|
156
156
|
`Interface 'ServerScript' type definitions written to ${absoluteOutputFile} (${methodDefinitions.length} function(s), ${globalTypeDefinitions.length} type(s)).`
|
|
157
157
|
);
|
|
158
158
|
} else {
|
|
159
|
-
outputContent = "export
|
|
159
|
+
outputContent = "export type ServerScripts = {}\n";
|
|
160
160
|
consola.consola.info(
|
|
161
161
|
`Interface 'ServerScript' type definitions written to ${absoluteOutputFile} (no functions found).`
|
|
162
162
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -91,7 +91,7 @@ const generateAppsScriptTypes = async ({
|
|
|
91
91
|
for (const funcDecl of sourceFile.getFunctions()) {
|
|
92
92
|
if (!funcDecl.isAmbient()) {
|
|
93
93
|
const name = funcDecl.getName();
|
|
94
|
-
if (name != null) {
|
|
94
|
+
if (name != null && !name.endsWith("_")) {
|
|
95
95
|
methodDefinitions.push(getInterfaceMethodDefinition_(name, funcDecl));
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -101,7 +101,7 @@ const generateAppsScriptTypes = async ({
|
|
|
101
101
|
for (const varDecl of varStmt.getDeclarations()) {
|
|
102
102
|
const initializer = varDecl.getInitializer();
|
|
103
103
|
const varName = varDecl.getName();
|
|
104
|
-
if (initializer != null && (initializer.getKind() === SyntaxKind.ArrowFunction || initializer.getKind() === SyntaxKind.FunctionExpression)) {
|
|
104
|
+
if (initializer != null && (initializer.getKind() === SyntaxKind.ArrowFunction || initializer.getKind() === SyntaxKind.FunctionExpression) && !varName.endsWith("_")) {
|
|
105
105
|
methodDefinitions.push(
|
|
106
106
|
getInterfaceMethodDefinition_(
|
|
107
107
|
varName,
|
|
@@ -130,7 +130,7 @@ const generateAppsScriptTypes = async ({
|
|
|
130
130
|
const formattedMethods = methodDefinitions.map(
|
|
131
131
|
(method) => method.split("\n").map((line) => ` ${line}`).join("\n")
|
|
132
132
|
).join("\n\n");
|
|
133
|
-
outputContent += `export
|
|
133
|
+
outputContent += `export type ServerScripts = {
|
|
134
134
|
${formattedMethods}
|
|
135
135
|
}
|
|
136
136
|
`;
|
|
@@ -138,7 +138,7 @@ ${formattedMethods}
|
|
|
138
138
|
`Interface 'ServerScript' type definitions written to ${absoluteOutputFile} (${methodDefinitions.length} function(s), ${globalTypeDefinitions.length} type(s)).`
|
|
139
139
|
);
|
|
140
140
|
} else {
|
|
141
|
-
outputContent = "export
|
|
141
|
+
outputContent = "export type ServerScripts = {}\n";
|
|
142
142
|
consola.info(
|
|
143
143
|
`Interface 'ServerScript' type definitions written to ${absoluteOutputFile} (no functions found).`
|
|
144
144
|
);
|