stonyx 0.2.3-beta.55 → 0.2.3-beta.56

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stonyx",
3
- "version": "0.2.3-beta.55",
3
+ "version": "0.2.3-beta.56",
4
4
  "description": "Base stonyx framework module",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",
@@ -2,12 +2,17 @@
2
2
  const isGlobal = !process.env.INIT_CWD || process.env.npm_config_global === 'true';
3
3
  if (isGlobal) process.exit(0);
4
4
 
5
+ const { existsSync } = await import('node:fs');
5
6
  const { copyFile, createDirectory } = await import('@stonyx/utils/file');
6
7
 
7
8
  const projectDir = process.env.INIT_CWD;
8
9
  const configDir = `${projectDir}/config`;
9
10
  const envFile = 'environment.js';
10
11
 
12
+ // Skip if the consumer ships its own `config/environment copy.js` template —
13
+ // they manage their own bootstrap (see abofs/stonyx#54).
14
+ if (existsSync(`${configDir}/environment copy.js`)) process.exit(0);
15
+
11
16
  createDirectory(configDir);
12
17
 
13
18
  copyFile(`./config/environment copy.js`, `${configDir}/${envFile}`).then(result => {
@@ -1,12 +0,0 @@
1
- // project configuration, override-able by listed environment variables
2
- const {
3
- DEBUG,
4
- NODE_ENV,
5
- } = process.env;
6
-
7
- const environment = NODE_ENV ?? 'development';
8
-
9
- export default {
10
- environment,
11
- debug: DEBUG ?? environment === 'development',
12
- }