silgi 0.23.0 → 0.23.1

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.
@@ -1,4 +1,4 @@
1
- const version = "0.23.0";
1
+ const version = "0.23.1";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^3.0.0",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -1504,6 +1504,9 @@ async function generateApp(app, options = {}) {
1504
1504
  }
1505
1505
  if (template.modified && template.write) {
1506
1506
  dirs.add(dirname(fullPath));
1507
+ if (template.skipIfExists && existsSync(fullPath)) {
1508
+ return;
1509
+ }
1507
1510
  writes.push(() => writeFileSync(fullPath, contents, "utf8"));
1508
1511
  }
1509
1512
  }
@@ -143,6 +143,7 @@ interface SilgiTemplate<Options = TemplateDefaultOptions> {
143
143
  }) => string | Promise<string>;
144
144
  /** Write to filesystem */
145
145
  write?: boolean;
146
+ skipIfExists?: boolean;
146
147
  }
147
148
  interface ResolvedSilgiTemplate<Options = TemplateDefaultOptions> extends SilgiTemplate<Options> {
148
149
  filename: string;
@@ -143,6 +143,7 @@ interface SilgiTemplate<Options = TemplateDefaultOptions> {
143
143
  }) => string | Promise<string>;
144
144
  /** Write to filesystem */
145
145
  write?: boolean;
146
+ skipIfExists?: boolean;
146
147
  }
147
148
  interface ResolvedSilgiTemplate<Options = TemplateDefaultOptions> extends SilgiTemplate<Options> {
148
149
  filename: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.23.0",
4
+ "version": "0.23.1",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {