@adobe/helix-deploy 12.0.0-pre.1 → 12.0.0-pre.3

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": "@adobe/helix-deploy",
3
- "version": "12.0.0-pre.1",
3
+ "version": "12.0.0-pre.3",
4
4
  "description": "Library and Commandline Tools to build and deploy OpenWhisk Actions",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/adobe/helix-deploy#readme",
package/src/BaseConfig.js CHANGED
@@ -190,6 +190,7 @@ export default class BaseConfig {
190
190
  .withVersion(argv.pkgVersion)
191
191
  .withNodeVersion(argv.nodeVersion)
192
192
  .withEntryFile(argv.entryFile)
193
+ .withDistDir(argv.distDirectory)
193
194
  .withAdapterFile(argv.adapterFile)
194
195
  .withExternals(argv.externals)
195
196
  .withEdgeExternals(argv.edgeExternals)
@@ -219,8 +220,8 @@ export default class BaseConfig {
219
220
  return this;
220
221
  }
221
222
 
222
- withDirectory(value) {
223
- this.cwd = value === '.' ? process.cwd() : value;
223
+ withDirectory(value = '.') {
224
+ this.cwd = path.resolve(process.cwd(), value);
224
225
  return this;
225
226
  }
226
227
 
@@ -450,7 +451,7 @@ export default class BaseConfig {
450
451
  }
451
452
 
452
453
  withDistDir(value) {
453
- this.distDir = value;
454
+ this.distDir = path.resolve(process.cwd(), value);
454
455
  return this;
455
456
  }
456
457
 
@@ -639,7 +640,7 @@ export default class BaseConfig {
639
640
  default: [],
640
641
  })
641
642
 
642
- .group(['minify', 'static', 'entryFile', 'externals', 'edge-externals', 'serverless-externals', 'modules', 'adapterFile', 'esm', 'bundler'], 'Build Options')
643
+ .group(['minify', 'static', 'entryFile', 'externals', 'edge-externals', 'serverless-externals', 'modules', 'adapterFile', 'esm', 'bundler', 'dist-directory'], 'Build Options')
643
644
  .option('minify', {
644
645
  description: 'Minify the final bundle',
645
646
  type: 'boolean',
@@ -662,6 +663,10 @@ export default class BaseConfig {
662
663
  type: 'array',
663
664
  default: [],
664
665
  })
666
+ .option('dist-directory', {
667
+ description: 'Specifies the dist (output) directory',
668
+ default: 'dist',
669
+ })
665
670
  .option('entryFile', {
666
671
  description: 'Specifies the entry file (the universal function).',
667
672
  default: 'src/index.js',
package/src/cli.js CHANGED
@@ -141,7 +141,7 @@ export default class CLI {
141
141
 
142
142
  async run(args) {
143
143
  try {
144
- const res = await this.prepare(args).run();
144
+ const res = (await this.prepare(args)).run();
145
145
  if (res) {
146
146
  console.log(JSON.stringify(res, null, 2));
147
147
  }
@@ -1,17 +0,0 @@
1
- /*
2
- * Copyright 2024 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */
12
- /* eslint-env serviceworker */
13
-
14
- export function extractPathFromURL(request) {
15
- const suffixMatches = /^https?:\/\/[^/]+([^?]+)/.exec(request.url);
16
- return suffixMatches ? suffixMatches[1] : request.url.replace(/\?.*/, '');
17
- }