@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 CHANGED
@@ -9,7 +9,7 @@ require('consola');
9
9
  require('node:fs');
10
10
  require('ts-morph');
11
11
 
12
- const version = "0.1.2";
12
+ const version = "0.1.3";
13
13
 
14
14
  const parseArgs = async (command) => {
15
15
  const { project, srcDir, outDir, outputFile, watch } = command.opts();
package/dist/cli.mjs CHANGED
@@ -7,7 +7,7 @@ import 'consola';
7
7
  import 'node:fs';
8
8
  import 'ts-morph';
9
9
 
10
- const version = "0.1.2";
10
+ const version = "0.1.3";
11
11
 
12
12
  const parseArgs = async (command) => {
13
13
  const { project, srcDir, outDir, outputFile, watch } = command.opts();
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 interface ServerScripts {
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 interface ServerScripts {}\n";
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 interface ServerScripts {
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 interface ServerScripts {}\n";
141
+ outputContent = "export type ServerScripts = {}\n";
142
142
  consola.info(
143
143
  `Interface 'ServerScript' type definitions written to ${absoluteOutputFile} (no functions found).`
144
144
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ciderjs/gasnuki",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "",
5
5
  "main": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",