@tinacms/scripts 0.51.0 → 0.51.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.
Files changed (2) hide show
  1. package/dist/index.js +9 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -363,6 +363,14 @@ var buildIt = async (entryPoint, packageJSON) => {
363
363
  const peerDeps = packageJSON.peerDependencies;
364
364
  const external = Object.keys(_chunkNYQD2IPWjs.__spreadValues.call(void 0, _chunkNYQD2IPWjs.__spreadValues.call(void 0, {}, deps), peerDeps));
365
365
  const globals = {};
366
+ const out = (entry2) => {
367
+ const { dir, name } = _path2.default.parse(entry2);
368
+ const outdir = dir.replace("src", "dist");
369
+ const outfile = name;
370
+ const relativeOutfile = _path2.default.join(outdir.split("/").map(() => "..").join("/"), dir, name);
371
+ return { outdir, outfile, relativeOutfile };
372
+ };
373
+ const outInfo = out(entry);
366
374
  external.forEach((ext) => globals[ext] = "NOOP");
367
375
  if (target === "node") {
368
376
  if (["@tinacms/graphql", "@tinacms/datalayer"].includes(packageJSON.name)) {
@@ -391,7 +399,7 @@ var buildIt = async (entryPoint, packageJSON) => {
391
399
  entryPoints: [_path2.default.join(process.cwd(), entry)],
392
400
  bundle: true,
393
401
  platform: "node",
394
- outfile: _path2.default.join(process.cwd(), "dist", "index.js"),
402
+ outfile: _path2.default.join(process.cwd(), "dist", `${outInfo.outfile}.js`),
395
403
  external,
396
404
  target: "node12"
397
405
  });
@@ -400,14 +408,6 @@ var buildIt = async (entryPoint, packageJSON) => {
400
408
  await _fsextra2.default.writeFileSync(_path2.default.join(process.cwd(), "dist", entry.replace("src/", "").replace(extension, ".d.ts")), `export * from "../${entry.replace(extension, "")}"`);
401
409
  return true;
402
410
  }
403
- const out = (entry2) => {
404
- const { dir, name } = _path2.default.parse(entry2);
405
- const outdir = dir.replace("src", "dist");
406
- const outfile = name;
407
- const relativeOutfile = _path2.default.join(outdir.split("/").map(() => "..").join("/"), dir, name);
408
- return { outdir, outfile, relativeOutfile };
409
- };
410
- const outInfo = out(entry);
411
411
  const defaultBuildConfig = {
412
412
  plugins: [
413
413
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/scripts",
3
- "version": "0.51.0",
3
+ "version": "0.51.1",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist",