@sdeverywhere/plugin-deploy 0.1.2 → 0.1.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/dist/index.d.ts +69 -67
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +353 -364
- package/dist/index.js.map +1 -1
- package/package.json +3 -5
- package/dist/index.cjs +0 -506
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -77
package/dist/index.d.cts
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { Plugin } from '@sdeverywhere/build';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Describes a build product that will be copied to the deployment directory.
|
|
5
|
-
*/
|
|
6
|
-
interface BuildProduct {
|
|
7
|
-
/**
|
|
8
|
-
* The name of the build product as used in the link in the top-level index page. If undefined,
|
|
9
|
-
* no link will be included in the top-level index page.
|
|
10
|
-
*/
|
|
11
|
-
displayName?: string;
|
|
12
|
-
/** The source path of the build product, relative to the project root directory (`rootDir`). */
|
|
13
|
-
srcPath: string;
|
|
14
|
-
/** The destination path of the build product, relative to the deployment directory (`deployDir`). */
|
|
15
|
-
dstPath: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* The options that control the deployment process.
|
|
19
|
-
*/
|
|
20
|
-
interface DeployPluginOptions {
|
|
21
|
-
/**
|
|
22
|
-
* The base URL for the published project. This is used for determining the URLs
|
|
23
|
-
* for remote bundle files used by model-check and for other purposes.
|
|
24
|
-
*
|
|
25
|
-
* By default, the plugin assumes deployment to GitHub Pages, so if this property is
|
|
26
|
-
* undefined, the following default template will be used:
|
|
27
|
-
* ```
|
|
28
|
-
* baseUrl: 'https://{GH_USERNAME_OR_ORG}.github.io/{GH_REPO_NAME}'
|
|
29
|
-
* ```
|
|
30
|
-
*
|
|
31
|
-
* For example, if your GitHub username is "sdmodeler123", and your GitHub repository
|
|
32
|
-
* is called "my-sd-model", `baseUrl` will be set as follows:
|
|
33
|
-
* ```
|
|
34
|
-
* baseUrl: 'https://sdmodeler123.github.io/my-sd-model'
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* IMPORTANT: If you set up GitHub Pages to use a custom domain, be sure to update
|
|
38
|
-
* this variable to use that custom domain, otherwise model-check may fail to load
|
|
39
|
-
* bundles due to cross origin redirect issues, for example:
|
|
40
|
-
* ```
|
|
41
|
-
* baseUrl: 'https://sdmodeler123.com/my-sd-model'
|
|
42
|
-
* ```
|
|
43
|
-
*
|
|
44
|
-
* If you use a different host/server (AWS, GitLab, etc) or publish to a different
|
|
45
|
-
* directory structure, you can update this variable to suit your needs, for example:
|
|
46
|
-
* ```
|
|
47
|
-
* baseUrl: 'https://sdmodeler123.com/projects/my-model'
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
baseUrl?: string;
|
|
51
|
-
/**
|
|
52
|
-
* The path of the directory to which the build products will be copied.
|
|
53
|
-
* If undefined, defaults to the "deploy" directory under the configured
|
|
54
|
-
* project `prepDir`. The plugin will create this directory if it does not
|
|
55
|
-
* exist.
|
|
56
|
-
*
|
|
57
|
-
* This directory is ephemeral and should be listed in your `.gitignore` file.
|
|
58
|
-
*/
|
|
59
|
-
deployDir?: string;
|
|
60
|
-
/**
|
|
61
|
-
* The build products that will be copied to the `deployDir` directory.
|
|
62
|
-
* If undefined, defaults to the following build products that are typically
|
|
63
|
-
* generated by the build process (if any of these are not available, the
|
|
64
|
-
* plugin will skip copying them):
|
|
65
|
-
* - The app: `packages/app/public -> ${deployDir}/app`
|
|
66
|
-
* - The model-check bundle: `sde-prep/check-bundle.js -> ${deployDir}/extras/check-bundle.js`
|
|
67
|
-
* - The model-check report: `sde-prep/check-report -> ${deployDir}/extras/check-compare-to-base`
|
|
68
|
-
*
|
|
69
|
-
* The keys of the record should be a short name for the build product, used in the `index.json`
|
|
70
|
-
* file that is generated by the plugin.
|
|
71
|
-
*/
|
|
72
|
-
products?: Record<string, BuildProduct>;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
declare function deployPlugin(options?: DeployPluginOptions): Plugin;
|
|
76
|
-
|
|
77
|
-
export { type BuildProduct, type DeployPluginOptions, deployPlugin };
|