@steambrew/ttc 1.2.1 → 1.4.2

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/index.js CHANGED
@@ -166,80 +166,215 @@ const ValidatePlugin = (target) => {
166
166
  });
167
167
  };
168
168
 
169
- const envConfig = dotenv.config().parsed || {};
170
- if (envConfig) {
171
- Logger.Info("Injecting environment variables...");
172
- }
173
- const envVars = Object.keys(envConfig).reduce((acc, key) => {
174
- acc[`process.env.${key}`] = JSON.stringify(envConfig[key]);
175
- return acc;
176
- }, {});
177
- const WrappedCallServerMethod = "const __call_server_method__ = (methodName, kwargs) => Millennium.callServerMethod(pluginName, methodName, kwargs)";
178
- const WrappedCallable = "const __wrapped_callable__ = (route) => MILLENNIUM_API.callable(__call_server_method__, route)";
179
169
  /**
180
170
  * @description Append the active plugin to the global plugin
181
171
  * list and notify that the frontend Loaded.
182
172
  */
183
173
  function ExecutePluginModule() {
184
- // Assign the plugin on plugin list.
185
- Object.assign(window.PLUGIN_LIST[pluginName], millennium_main);
186
- // Run the rolled up plugins default exported function
187
- millennium_main["default"]();
188
- MILLENNIUM_BACKEND_IPC.postMessage(1, { pluginName: pluginName });
189
- }
190
- /**
191
- * @description Append the active plugin to the global plugin
192
- * list and notify that the frontend Loaded.
193
- */
194
- function ExecuteWebkitModule() {
195
- // Assign the plugin on plugin list.
196
- Object.assign(window.PLUGIN_LIST[pluginName], millennium_main);
197
- // Run the rolled up plugins default exported function
198
- millennium_main["default"]();
174
+ let MillenniumStore = window.MILLENNIUM_PLUGIN_SETTINGS_STORE[pluginName];
175
+ function OnPluginConfigChange(key, __, value) {
176
+ if (key in MillenniumStore.settingsStore) {
177
+ MillenniumStore.ignoreProxyFlag = true;
178
+ MillenniumStore.settingsStore[key] = value;
179
+ MillenniumStore.ignoreProxyFlag = false;
180
+ }
181
+ }
182
+ /** Expose the OnPluginConfigChange so it can be called externally */
183
+ MillenniumStore.OnPluginConfigChange = OnPluginConfigChange;
184
+ MILLENNIUM_BACKEND_IPC.postMessage(0, { pluginName: pluginName, methodName: '__builtins__.__millennium_plugin_settings_parser__' }).then((response) => {
185
+ /**
186
+ * __millennium_plugin_settings_parser__ will return false if the plugin has no settings.
187
+ * If the plugin has settings, it will return a base64 encoded string.
188
+ * The string is then decoded and parsed into an object.
189
+ */
190
+ if (typeof response.returnValue === 'string') {
191
+ MillenniumStore.ignoreProxyFlag = true;
192
+ /** Initialize the settings store from the settings returned from the backend. */
193
+ MillenniumStore.settingsStore = MillenniumStore.DefinePluginSetting(Object.fromEntries(JSON.parse(atob(response.returnValue)).map((item) => [item.functionName, item])));
194
+ MillenniumStore.ignoreProxyFlag = false;
195
+ }
196
+ /** @ts-ignore: call the plugin main after the settings have been parsed. This prevent plugin settings from being undefined at top level. */
197
+ let PluginModule = PluginEntryPointMain();
198
+ /** Assign the plugin on plugin list. */
199
+ Object.assign(window.PLUGIN_LIST[pluginName], {
200
+ ...PluginModule,
201
+ __millennium_internal_plugin_name_do_not_use_or_change__: pluginName,
202
+ });
203
+ /** Run the rolled up plugins default exported function */
204
+ PluginModule.default();
205
+ /** If the current module is a client module, post message id=1 which calls the front_end_loaded method on the backend. */
206
+ if (MILLENNIUM_IS_CLIENT_MODULE) {
207
+ MILLENNIUM_BACKEND_IPC.postMessage(1, { pluginName: pluginName });
208
+ }
209
+ });
199
210
  }
200
211
  /**
201
- * @description Simple bootstrap function that initializes PLUGIN_LIST
202
- * for current plugin given that is doesnt exist.
212
+ * @description Initialize the plugins settings store and the plugin list.
213
+ * This function is called once per plugin and is used to store the plugin settings and the plugin list.
203
214
  */
204
215
  function InitializePlugins() {
216
+ var _a, _b;
205
217
  /**
206
218
  * This function is called n times depending on n plugin count,
207
219
  * Create the plugin list if it wasn't already created
208
220
  */
209
- !window.PLUGIN_LIST && (window.PLUGIN_LIST = {});
210
- // initialize a container for the plugin
211
- if (!window.PLUGIN_LIST[pluginName]) {
212
- window.PLUGIN_LIST[pluginName] = {};
221
+ (_a = (window.PLUGIN_LIST || (window.PLUGIN_LIST = {})))[pluginName] || (_a[pluginName] = {});
222
+ (_b = (window.MILLENNIUM_PLUGIN_SETTINGS_STORE || (window.MILLENNIUM_PLUGIN_SETTINGS_STORE = {})))[pluginName] || (_b[pluginName] = {});
223
+ /**
224
+ * Accepted IPC message types from Millennium backend.
225
+ */
226
+ let IPCType;
227
+ (function (IPCType) {
228
+ IPCType[IPCType["CallServerMethod"] = 0] = "CallServerMethod";
229
+ })(IPCType || (IPCType = {}));
230
+ let MillenniumStore = window.MILLENNIUM_PLUGIN_SETTINGS_STORE[pluginName];
231
+ let IPCMessageId = `Millennium.Internal.IPC.[${pluginName}]`;
232
+ let isClientModule = MILLENNIUM_IS_CLIENT_MODULE;
233
+ const ComponentTypeMap = {
234
+ DropDown: ['string', 'number', 'boolean'],
235
+ NumberTextInput: ['number'],
236
+ StringTextInput: ['string'],
237
+ FloatTextInput: ['number'],
238
+ CheckBox: ['boolean'],
239
+ NumberSlider: ['number'],
240
+ FloatSlider: ['number'],
241
+ };
242
+ MillenniumStore.ignoreProxyFlag = false;
243
+ function DelegateToBackend(pluginName, name, value) {
244
+ console.log(`Delegating ${name} to backend`, value);
245
+ // print stack trace
246
+ const stack = new Error().stack?.split('\n').slice(2).join('\n');
247
+ console.log(stack);
248
+ return MILLENNIUM_BACKEND_IPC.postMessage(IPCType.CallServerMethod, {
249
+ pluginName,
250
+ methodName: '__builtins__.__update_settings_value__',
251
+ argumentList: { name, value },
252
+ });
213
253
  }
214
- }
215
- const ContructFunctions = (parts) => { return parts.join('\n'); };
216
- function InsertMillennium(props) {
217
- const generateBundle = (_, bundle) => {
218
- for (const fileName in bundle) {
219
- if (bundle[fileName].type != 'chunk')
220
- continue;
221
- Logger.Info("Injecting Millennium shims into module... " + chalk.green.bold("okay"));
222
- bundle[fileName].code = ContructFunctions([
223
- `const pluginName = "${props.strPluginInternalName}";`,
224
- InitializePlugins.toString(), InitializePlugins.name + "()",
225
- WrappedCallServerMethod, WrappedCallable, bundle[fileName].code,
226
- ExecutePluginModule.toString(), ExecutePluginModule.name + "()"
227
- ]);
254
+ async function ClientInitializeIPC() {
255
+ /** Wait for the MainWindowBrowser to not be undefined */
256
+ while (typeof MainWindowBrowserManager === 'undefined') {
257
+ await new Promise((resolve) => setTimeout(resolve, 0));
258
+ }
259
+ MainWindowBrowserManager.m_browser.on('message', (messageId, data) => {
260
+ if (messageId !== IPCMessageId) {
261
+ return;
262
+ }
263
+ const { name, value } = JSON.parse(data);
264
+ MillenniumStore.ignoreProxyFlag = true;
265
+ MillenniumStore.settingsStore[name] = value;
266
+ DelegateToBackend(pluginName, name, value);
267
+ MillenniumStore.ignoreProxyFlag = false;
268
+ });
269
+ }
270
+ function WebkitInitializeIPC() {
271
+ SteamClient.BrowserView.RegisterForMessageFromParent((messageId, data) => {
272
+ if (messageId !== IPCMessageId) {
273
+ return;
274
+ }
275
+ const payload = JSON.parse(data);
276
+ MillenniumStore.ignoreProxyFlag = true;
277
+ MillenniumStore.settingsStore[payload.name] = payload.value;
278
+ MillenniumStore.ignoreProxyFlag = false;
279
+ });
280
+ }
281
+ isClientModule ? ClientInitializeIPC() : WebkitInitializeIPC();
282
+ const StartSettingPropagation = (name, value) => {
283
+ if (MillenniumStore.ignoreProxyFlag) {
284
+ return;
285
+ }
286
+ if (isClientModule) {
287
+ DelegateToBackend(pluginName, name, value);
288
+ /** If the browser doesn't exist yet, no use sending anything to it. */
289
+ if (typeof MainWindowBrowserManager !== 'undefined') {
290
+ MainWindowBrowserManager?.m_browser?.PostMessage(IPCMessageId, JSON.stringify({ name, value }));
291
+ }
292
+ }
293
+ else {
294
+ /** Send the message to the SharedJSContext */
295
+ SteamClient.BrowserView.PostMessageToParent(IPCMessageId, JSON.stringify({ name, value }));
228
296
  }
229
297
  };
230
- return { name: String(), generateBundle };
298
+ function clamp(value, min, max) {
299
+ return Math.max(min, Math.min(max, value));
300
+ }
301
+ const DefinePluginSetting = (obj) => {
302
+ return new Proxy(obj, {
303
+ set(target, property, value) {
304
+ if (!(property in target)) {
305
+ throw new TypeError(`Property ${String(property)} does not exist on plugin settings`);
306
+ }
307
+ const settingType = ComponentTypeMap[target[property].type];
308
+ const range = target[property]?.range;
309
+ /** Clamp the value between the given range */
310
+ if (settingType.includes('number') && typeof value === 'number') {
311
+ if (range) {
312
+ value = clamp(value, range[0], range[1]);
313
+ }
314
+ value || (value = 0); // Fallback to 0 if the value is undefined or null
315
+ }
316
+ /** Check if the value is of the proper type */
317
+ if (!settingType.includes(typeof value)) {
318
+ throw new TypeError(`Expected ${settingType.join(' or ')}, got ${typeof value}`);
319
+ }
320
+ target[property].value = value;
321
+ StartSettingPropagation(String(property), value);
322
+ return true;
323
+ },
324
+ get(target, property) {
325
+ if (property === '__raw_get_internals__') {
326
+ return target;
327
+ }
328
+ if (property in target) {
329
+ return target[property].value;
330
+ }
331
+ return undefined;
332
+ },
333
+ });
334
+ };
335
+ MillenniumStore.DefinePluginSetting = DefinePluginSetting;
336
+ MillenniumStore.settingsStore = DefinePluginSetting({});
231
337
  }
232
- function InsertWebkitMillennium(props) {
338
+
339
+ const envConfig = dotenv.config().parsed || {};
340
+ if (envConfig) {
341
+ Logger.Info('Injecting environment variables...');
342
+ }
343
+ const envVars = Object.keys(envConfig).reduce((acc, key) => {
344
+ acc[key] = envConfig[key];
345
+ return acc;
346
+ }, {});
347
+ var ComponentType;
348
+ (function (ComponentType) {
349
+ ComponentType[ComponentType["Plugin"] = 0] = "Plugin";
350
+ ComponentType[ComponentType["Webkit"] = 1] = "Webkit";
351
+ })(ComponentType || (ComponentType = {}));
352
+ const WrappedCallServerMethod = 'const __call_server_method__ = (methodName, kwargs) => Millennium.callServerMethod(pluginName, methodName, kwargs)';
353
+ const WrappedCallable = 'const __wrapped_callable__ = (route) => MILLENNIUM_API.callable(__call_server_method__, route)';
354
+ const ConstructFunctions = (parts) => {
355
+ return parts.join('\n');
356
+ };
357
+ function generate(code) {
358
+ /** Wrap it in a proxy */
359
+ return `let PluginEntryPointMain = function() { ${code} return millennium_main; };`;
360
+ }
361
+ function InsertMillennium(type, props) {
233
362
  const generateBundle = (_, bundle) => {
234
363
  for (const fileName in bundle) {
235
- if (bundle[fileName].type != 'chunk')
364
+ if (bundle[fileName].type != 'chunk') {
236
365
  continue;
237
- Logger.Info("Injecting Millennium shims into webkit module... " + chalk.green.bold("okay"));
238
- bundle[fileName].code = ContructFunctions([
366
+ }
367
+ Logger.Info('Injecting Millennium shims into ' + ComponentType[type] + ' module... ' + chalk.green.bold('okay'));
368
+ bundle[fileName].code = ConstructFunctions([
369
+ `const MILLENNIUM_IS_CLIENT_MODULE = ${type === ComponentType.Plugin ? 'true' : 'false'};`,
239
370
  `const pluginName = "${props.strPluginInternalName}";`,
240
- InitializePlugins.toString(), InitializePlugins.name + "()",
241
- WrappedCallServerMethod, WrappedCallable, bundle[fileName].code,
242
- ExecuteWebkitModule.toString(), ExecuteWebkitModule.name + "()"
371
+ InitializePlugins.toString(),
372
+ InitializePlugins.name + '()',
373
+ WrappedCallServerMethod,
374
+ WrappedCallable,
375
+ generate(bundle[fileName].code),
376
+ ExecutePluginModule.toString(),
377
+ ExecutePluginModule.name + '()',
243
378
  ]);
244
379
  }
245
380
  };
@@ -251,11 +386,13 @@ function GetPluginComponents(props) {
251
386
  tsConfigPath = './tsconfig.json';
252
387
  }
253
388
  const pluginList = [
254
- InsertMillennium(props),
389
+ InsertMillennium(ComponentType.Plugin, props),
255
390
  typescript({
256
- tsconfig: tsConfigPath
391
+ tsconfig: tsConfigPath,
257
392
  }),
258
- resolve(), commonjs(), json(),
393
+ resolve(),
394
+ commonjs(),
395
+ json(),
259
396
  injectProcessEnv(envVars),
260
397
  replace({
261
398
  delimiters: ['', ''],
@@ -264,7 +401,8 @@ function GetPluginComponents(props) {
264
401
  'Millennium.callServerMethod': `__call_server_method__`,
265
402
  'client.callable': `__wrapped_callable__`,
266
403
  'client.pluginSelf': 'window.PLUGIN_LIST[pluginName]',
267
- 'client.Millennium.exposeObj(': 'client.Millennium.exposeObj(exports, '
404
+ 'client.Millennium.exposeObj(': 'client.Millennium.exposeObj(exports, ',
405
+ 'client.BindPluginSettings()': 'client.BindPluginSettings(pluginName)',
268
406
  }),
269
407
  ];
270
408
  if (props.bTersePlugin) {
@@ -274,22 +412,25 @@ function GetPluginComponents(props) {
274
412
  }
275
413
  function GetWebkitPluginComponents(props) {
276
414
  const pluginList = [
277
- InsertWebkitMillennium(props),
415
+ InsertMillennium(ComponentType.Webkit, props),
278
416
  typescript({
279
- tsconfig: './webkit/tsconfig.json'
417
+ tsconfig: './webkit/tsconfig.json',
280
418
  }),
281
- resolve(), commonjs(), json(),
419
+ resolve(),
420
+ commonjs(),
421
+ json(),
282
422
  injectProcessEnv(envVars),
283
423
  replace({
284
424
  delimiters: ['', ''],
285
425
  preventAssignment: true,
286
426
  'Millennium.callServerMethod': `__call_server_method__`,
287
427
  'webkit.callable': `__wrapped_callable__`,
428
+ 'client.BindPluginSettings()': 'client.BindPluginSettings(pluginName)',
288
429
  }),
289
430
  babel({
290
431
  presets: ['@babel/preset-env', '@babel/preset-react'],
291
432
  babelHelpers: 'bundled',
292
- })
433
+ }),
293
434
  ];
294
435
  props.bTersePlugin && pluginList.push(terser());
295
436
  return pluginList;
@@ -297,10 +438,10 @@ function GetWebkitPluginComponents(props) {
297
438
  const GetFrontEndDirectory = () => {
298
439
  const pluginJsonPath = './plugin.json';
299
440
  try {
300
- return JSON.parse(fs.readFileSync(pluginJsonPath, 'utf8'))?.frontend ?? "frontend";
441
+ return JSON.parse(fs.readFileSync(pluginJsonPath, 'utf8'))?.frontend ?? 'frontend';
301
442
  }
302
443
  catch (error) {
303
- return "frontend";
444
+ return 'frontend';
304
445
  }
305
446
  };
306
447
  const TranspilerPluginComponent = async (props) => {
@@ -313,25 +454,26 @@ const TranspilerPluginComponent = async (props) => {
313
454
  Logger.Error('The @steambrew/webkit module should not be included in the frontend module, use @steambrew/client instead. Please remove it from the frontend module and try again.');
314
455
  process.exit(1);
315
456
  }
316
- return id === '@steambrew/client' || id === 'react' || id === 'react-dom';
457
+ return id === '@steambrew/client' || id === 'react' || id === 'react-dom' || id === 'react-dom/client';
317
458
  },
318
459
  output: {
319
- name: "millennium_main",
320
- file: ".millennium/Dist/index.js",
460
+ name: 'millennium_main',
461
+ file: '.millennium/Dist/index.js',
321
462
  globals: {
322
- "react": "window.SP_REACT",
323
- "react-dom": "window.SP_REACTDOM",
324
- "@steambrew/client": "window.MILLENNIUM_API"
463
+ react: 'window.SP_REACT',
464
+ 'react-dom': 'window.SP_REACTDOM',
465
+ 'react-dom/client': 'window.SP_REACTDOM',
466
+ '@steambrew/client': 'window.MILLENNIUM_API',
325
467
  },
326
468
  exports: 'named',
327
- format: 'iife'
328
- }
469
+ format: 'iife',
470
+ },
329
471
  };
330
- Logger.Info("Starting build; this may take a few moments...");
472
+ Logger.Info('Starting build; this may take a few moments...');
331
473
  try {
332
474
  await (await rollup(frontendRollupConfig)).write(frontendRollupConfig.output);
333
475
  if (fs.existsSync(`./webkit/index.tsx`)) {
334
- Logger.Info("Compiling webkit module...");
476
+ Logger.Info('Compiling webkit module...');
335
477
  const webkitRollupConfig = {
336
478
  input: `./webkit/index.tsx`,
337
479
  plugins: GetWebkitPluginComponents(props),
@@ -344,14 +486,14 @@ const TranspilerPluginComponent = async (props) => {
344
486
  return id === '@steambrew/webkit';
345
487
  },
346
488
  output: {
347
- name: "millennium_main",
348
- file: ".millennium/Dist/webkit.js",
489
+ name: 'millennium_main',
490
+ file: '.millennium/Dist/webkit.js',
349
491
  exports: 'named',
350
492
  format: 'iife',
351
493
  globals: {
352
- "@steambrew/webkit": "window.MILLENNIUM_API"
494
+ '@steambrew/webkit': 'window.MILLENNIUM_API',
353
495
  },
354
- }
496
+ },
355
497
  };
356
498
  await (await rollup(webkitRollupConfig)).write(webkitRollupConfig.output);
357
499
  }
package/index.ts CHANGED
@@ -1,65 +1,65 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * this component serves as:
5
- * - typescript transpiler
6
- * - rollup configurator
7
- */
8
- import { BuildType, ValidateParameters } from "./Parameters"
9
- import { CheckForUpdates } from "./VersionMon"
10
- import { ValidatePlugin } from './Linter'
11
- import { TranspilerPluginComponent, TranspilerProps } from './Compiler'
12
- import { performance } from 'perf_hooks';
13
- import { Logger } from "./Logger";
14
- // import { Logger } from './Logger'
15
-
16
- declare global {
17
- var PerfStartTime: number;
18
- }
19
-
20
- const CheckModuleUpdates = async () => {
21
- return await CheckForUpdates()
22
- }
23
-
24
- const StartCompilerModule = () => {
25
-
26
- const parameters = ValidateParameters( process.argv.slice(2) );
27
- const bTersePlugin = parameters.type == BuildType.ProdBuild
28
-
29
- Logger.Tree("Transpiler config: ", {
30
- target: parameters.targetPlugin,
31
- build: BuildType[parameters.type],
32
- minify: bTersePlugin
33
- })
34
-
35
- ValidatePlugin(parameters.targetPlugin).then((json: any) => {
36
-
37
- const props: TranspilerProps = {
38
- bTersePlugin: bTersePlugin,
39
- strPluginInternalName: json?.name
40
- }
41
-
42
- TranspilerPluginComponent(props)
43
- })
44
-
45
- /**
46
- * plugin is invalid, we close the proccess as it has already been handled
47
- */
48
- .catch(() => {
49
- process.exit()
50
- })
51
- }
52
-
53
- const Initialize = () => {
54
- global.PerfStartTime = performance.now();
55
-
56
- // Check for --no-update flag
57
- if (process.argv.includes("--no-update")) {
58
- StartCompilerModule()
59
- return
60
- }
61
-
62
- CheckModuleUpdates().then(StartCompilerModule)
63
- }
64
-
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * this component serves as:
5
+ * - typescript transpiler
6
+ * - rollup configurator
7
+ */
8
+ import { BuildType, ValidateParameters } from "./Parameters"
9
+ import { CheckForUpdates } from "./VersionMon"
10
+ import { ValidatePlugin } from './Linter'
11
+ import { TranspilerPluginComponent, TranspilerProps } from './Compiler'
12
+ import { performance } from 'perf_hooks';
13
+ import { Logger } from "./Logger";
14
+ // import { Logger } from './Logger'
15
+
16
+ declare global {
17
+ var PerfStartTime: number;
18
+ }
19
+
20
+ const CheckModuleUpdates = async () => {
21
+ return await CheckForUpdates()
22
+ }
23
+
24
+ const StartCompilerModule = () => {
25
+
26
+ const parameters = ValidateParameters( process.argv.slice(2) );
27
+ const bTersePlugin = parameters.type == BuildType.ProdBuild
28
+
29
+ Logger.Tree("Transpiler config: ", {
30
+ target: parameters.targetPlugin,
31
+ build: BuildType[parameters.type],
32
+ minify: bTersePlugin
33
+ })
34
+
35
+ ValidatePlugin(parameters.targetPlugin).then((json: any) => {
36
+
37
+ const props: TranspilerProps = {
38
+ bTersePlugin: bTersePlugin,
39
+ strPluginInternalName: json?.name
40
+ }
41
+
42
+ TranspilerPluginComponent(props)
43
+ })
44
+
45
+ /**
46
+ * plugin is invalid, we close the proccess as it has already been handled
47
+ */
48
+ .catch(() => {
49
+ process.exit()
50
+ })
51
+ }
52
+
53
+ const Initialize = () => {
54
+ global.PerfStartTime = performance.now();
55
+
56
+ // Check for --no-update flag
57
+ if (process.argv.includes("--no-update")) {
58
+ StartCompilerModule()
59
+ return
60
+ }
61
+
62
+ CheckModuleUpdates().then(StartCompilerModule)
63
+ }
64
+
65
65
  Initialize();
package/package.json CHANGED
@@ -1,40 +1,38 @@
1
- {
2
- "name": "@steambrew/ttc",
3
- "version": "1.2.1",
4
- "type": "module",
5
- "main": "dist/index.js",
6
- "module": "dist/index.js",
7
- "bin": {
8
- "millennium-ttc": "dist/index.js"
9
- },
10
- "scripts": {
11
- "build": "rollup -c"
12
- },
13
- "publishConfig": {
14
- "access": "public"
15
- },
16
- "keywords": [],
17
- "author": "",
18
- "license": "ISC",
19
- "description": "A tiny typescript compiler for Millennium plugins.",
20
- "dependencies": {
21
- "@babel/preset-env": "^7.26.0",
22
- "@babel/preset-react": "^7.25.9",
23
- "@rollup/plugin-babel": "^6.0.4",
24
- "@rollup/plugin-commonjs": "^28.0.1",
25
- "@rollup/plugin-json": "^6.1.0",
26
- "@rollup/plugin-node-resolve": "^15.3.0",
27
- "@rollup/plugin-replace": "^6.0.1",
28
- "@rollup/plugin-terser": "^0.4.4",
29
- "@rollup/plugin-typescript": "^12.1.1",
30
- "chalk": "^5.3.0",
31
- "dotenv": "^16.4.7",
32
- "fs": "^0.0.1-security",
33
- "rollup": "^4.28.0",
34
- "rollup-plugin-inject-process-env": "^1.3.1",
35
- "tslib": "^2.8.1"
36
- },
37
- "devDependencies": {
38
- "@types/node": "^22.10.1"
39
- }
40
- }
1
+ {
2
+ "name": "@steambrew/ttc",
3
+ "version": "1.4.2",
4
+ "type": "module",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.js",
7
+ "bin": {
8
+ "millennium-ttc": "dist/index.js"
9
+ },
10
+ "scripts": {
11
+ "build": "rollup -c",
12
+ "prepare": "npm run build"
13
+ },
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "keywords": [],
18
+ "author": "",
19
+ "license": "ISC",
20
+ "description": "A tiny typescript compiler for Millennium plugins.",
21
+ "dependencies": {
22
+ "@babel/preset-env": "^7.26.0",
23
+ "@babel/preset-react": "^7.25.9",
24
+ "@rollup/plugin-babel": "^6.0.4",
25
+ "@rollup/plugin-commonjs": "^28.0.1",
26
+ "@rollup/plugin-json": "^6.1.0",
27
+ "@rollup/plugin-node-resolve": "^15.3.0",
28
+ "@rollup/plugin-replace": "^6.0.1",
29
+ "@rollup/plugin-terser": "^0.4.4",
30
+ "@rollup/plugin-typescript": "^12.1.1",
31
+ "chalk": "^5.3.0",
32
+ "dotenv": "^16.4.7",
33
+ "fs": "^0.0.1-security",
34
+ "rollup": "^4.28.0",
35
+ "rollup-plugin-inject-process-env": "^1.3.1",
36
+ "tslib": "^2.8.1"
37
+ }
38
+ }