Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/alpha' into alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
oprypkhantc committed Apr 23, 2024
2 parents 7536307 + 7d3ced7 commit f04211b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [1.0.0-alpha.7](https://github.com/tenantcloud/template-sync/compare/v1.0.0-alpha.6...v1.0.0-alpha.7) (2024-04-23)


### Features

* Add more debug logging ([0e7f297](https://github.com/tenantcloud/template-sync/commit/0e7f29700f42925c54e5356313fa18a24ca769e2))

# [1.0.0-alpha.6](https://github.com/tenantcloud/template-sync/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2024-04-23)


Expand Down
6 changes: 5 additions & 1 deletion dist/github-action/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52991,13 +52991,17 @@ const optionsSchema = z.strictObject({
const options = optionsSchema.parse(rawOptions);
return async function (template, source, reserved) {
const templateFiles = await template.files(options.filter, reserved);
console.debug(`Files from the template: ${templateFiles.join(", ")}`);
for (const file of templateFiles) {
await (0,lib.ensureDir)((0,external_path_.dirname)(source.path(file)));
await (0,external_fs_promises_namespaceObject.copyFile)(template.path(file), source.path(file));
}
if (options.deleteExtra) {
const sourceFiles = await source.files(options.filter, reserved);
for (const file of commonjs.difference.multiset(sourceFiles, templateFiles)) {
console.debug(`Files from the source: ${sourceFiles.join(", ")}`);
const extraFiles = commonjs.difference.multiset(sourceFiles, templateFiles);
console.debug(`Deleting extra non-matching files: ${extraFiles.join(", ")}`);
for (const file of extraFiles) {
await (0,external_fs_promises_namespaceObject.unlink)(source.path(file));
}
}
Expand Down

0 comments on commit f04211b

Please sign in to comment.