@batijs/build 0.0.648 → 0.0.650

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.d.ts CHANGED
@@ -6,6 +6,7 @@ declare function main(options: {
6
6
  source: string | string[];
7
7
  dist: string;
8
8
  env?: EnvRegistry;
9
+ deploy?: string[];
9
10
  }, meta: VikeMeta): Promise<void>;
10
11
  //#endregion
11
12
  export { main as default, walk };
package/dist/index.js CHANGED
@@ -134,7 +134,7 @@ async function transformFileAfterExec(filepath, fileContent) {
134
134
  async function importTransformer(p) {
135
135
  return (await (isWin ? import(`file://${p}`) : import(p))).default;
136
136
  }
137
- async function executeOperationTransform(op, { meta, previousOperationSameDestination, packageJson, env }) {
137
+ async function executeOperationTransform(op, { meta, previousOperationSameDestination, packageJson, env, deploy }) {
138
138
  const transformer = await importTransformer(op.sourceAbsolute);
139
139
  const previousContent = previousOperationSameDestination?.content;
140
140
  const fileContent = await transformFileAfterExec(op.destination, await transformer({
@@ -143,7 +143,8 @@ async function executeOperationTransform(op, { meta, previousOperationSameDestin
143
143
  source: op.source,
144
144
  target: op.destination,
145
145
  packageJson,
146
- env
146
+ env,
147
+ deploy
147
148
  }));
148
149
  return { content: fileContent !== null ? fileContent : void 0 };
149
150
  }
@@ -254,6 +255,7 @@ async function* walk(dir) {
254
255
  async function main(options, meta) {
255
256
  const sources = Array.isArray(options.source) ? options.source : [options.source];
256
257
  const env = options.env ?? [];
258
+ const deploy = options.deploy ?? [];
257
259
  function updateAllImports(target, imports, includeIfImported) {
258
260
  const rf = new RelationFile(target, includeIfImported);
259
261
  if (!imports) return;
@@ -305,7 +307,8 @@ Please report this issue to https://github.com/vikejs/bati`);
305
307
  meta,
306
308
  previousOperationSameDestination: previousOp,
307
309
  packageJson,
308
- env
310
+ env,
311
+ deploy
309
312
  });
310
313
  if (report.content) {
311
314
  await safeWriteFile(op.destination, report.content.trimStart());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@batijs/build",
3
- "version": "0.0.648",
3
+ "version": "0.0.650",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -13,14 +13,14 @@
13
13
  "repository": "https://github.com/vikejs/bati",
14
14
  "license": "MIT",
15
15
  "devDependencies": {
16
- "@batijs/compile": "0.0.648",
17
- "@batijs/core": "0.0.648",
18
- "@batijs/features": "0.0.648",
16
+ "@batijs/compile": "0.0.650",
17
+ "@batijs/core": "0.0.650",
18
+ "@batijs/features": "0.0.650",
19
19
  "@types/node": "^20.19.37",
20
20
  "tsdown": "^0.22.2"
21
21
  },
22
22
  "peerDependencies": {
23
- "@batijs/core": "0.0.648"
23
+ "@batijs/core": "0.0.650"
24
24
  },
25
25
  "main": "./dist/index.js",
26
26
  "module": "./dist/index.js",