@openfn/project 0.14.2 → 0.14.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 +4 -3
- package/dist/index.js +7 -2
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as l from '@openfn/lexicon';
|
|
2
2
|
import l__default, { SandboxMeta, WorkspaceConfig, UUID } from '@openfn/lexicon';
|
|
3
|
-
import { Logger } from '@openfn/logger';
|
|
4
3
|
import { Provisioner } from '@openfn/lexicon/lightning';
|
|
4
|
+
import { Logger } from '@openfn/logger';
|
|
5
5
|
|
|
6
6
|
type DiffType = 'added' | 'changed' | 'removed';
|
|
7
7
|
type WorkflowDiff = {
|
|
@@ -78,6 +78,7 @@ type fromAppStateConfig = Partial<l.WorkspaceConfig> & {
|
|
|
78
78
|
format?: 'yaml' | 'json';
|
|
79
79
|
alias?: string;
|
|
80
80
|
};
|
|
81
|
+
declare const mapWorkflow: (workflow: Provisioner.Workflow, credentials?: Credential[]) => l.Workflow;
|
|
81
82
|
|
|
82
83
|
type FromPathConfig = l.WorkspaceConfig & {
|
|
83
84
|
format: 'json' | 'yaml';
|
|
@@ -182,7 +183,7 @@ declare class Project {
|
|
|
182
183
|
collections: any;
|
|
183
184
|
credentials: Credential[];
|
|
184
185
|
sandbox?: SandboxMeta;
|
|
185
|
-
static from(type: 'project', data: any,
|
|
186
|
+
static from(type: 'project', data: any, config?: Partial<l__default.WorkspaceConfig>): Promise<Project>;
|
|
186
187
|
static from(type: 'state', data: Provisioner.Project, meta?: Partial<l__default.ProjectMeta>, config?: fromAppStateConfig): Promise<Project>;
|
|
187
188
|
static from(type: 'fs', options: FromFsConfig): Promise<Project>;
|
|
188
189
|
static from(type: 'path', data: string, options?: {
|
|
@@ -248,4 +249,4 @@ type GenerateProjectOptions = GenerateWorkflowOptions & {
|
|
|
248
249
|
declare function generateWorkflow(def: string, options?: Partial<GenerateWorkflowOptions>): Workflow;
|
|
249
250
|
declare function generateProject(name: string, workflowDefs: string[], options?: Partial<GenerateProjectOptions>): Project;
|
|
250
251
|
|
|
251
|
-
export { DiffType, WorkflowDiff, Workspace, Project as default, diff, generateProject, generateHash as generateVersionHash, generateWorkflow, jsonToYaml, match as versionsEqual, yamlToJson };
|
|
252
|
+
export { DiffType, WorkflowDiff, Workspace, Project as default, diff, generateProject, generateHash as generateVersionHash, generateWorkflow, jsonToYaml, mapWorkflow, match as versionsEqual, yamlToJson };
|
package/dist/index.js
CHANGED
|
@@ -55,7 +55,7 @@ var parse = (credentialName) => {
|
|
|
55
55
|
// src/serialize/to-app-state.ts
|
|
56
56
|
var defaultJobProps = {
|
|
57
57
|
// TODO why does the provisioner throw if these keys are not set?
|
|
58
|
-
// Ok, 90% of jobs will have a
|
|
58
|
+
// Ok, 90% of jobs will have a credential, but it's still optional right?
|
|
59
59
|
keychain_credential_id: null,
|
|
60
60
|
project_credential_id: null
|
|
61
61
|
};
|
|
@@ -1450,7 +1450,11 @@ Pass --force to force the merge anyway`
|
|
|
1450
1450
|
}
|
|
1451
1451
|
}
|
|
1452
1452
|
const assigns = options.mode === SANDBOX_MERGE ? {
|
|
1453
|
-
workflows: finalWorkflows
|
|
1453
|
+
workflows: finalWorkflows,
|
|
1454
|
+
credentials: replaceCredentials(
|
|
1455
|
+
source.credentials,
|
|
1456
|
+
target.credentials
|
|
1457
|
+
)
|
|
1454
1458
|
} : {
|
|
1455
1459
|
workflows: finalWorkflows,
|
|
1456
1460
|
openfn: {
|
|
@@ -2070,6 +2074,7 @@ export {
|
|
|
2070
2074
|
generateHash as generateVersionHash,
|
|
2071
2075
|
generateWorkflow,
|
|
2072
2076
|
jsonToYaml,
|
|
2077
|
+
mapWorkflow2 as mapWorkflow,
|
|
2073
2078
|
match as versionsEqual,
|
|
2074
2079
|
yamlToJson
|
|
2075
2080
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/project",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.3",
|
|
4
4
|
"description": "Read, serialize, replicate and sync OpenFn projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"lodash-es": "^4.17.21",
|
|
35
35
|
"ohm-js": "^17.2.1",
|
|
36
36
|
"yaml": "^2.2.2",
|
|
37
|
-
"@openfn/
|
|
38
|
-
"@openfn/
|
|
37
|
+
"@openfn/lexicon": "^1.4.1",
|
|
38
|
+
"@openfn/logger": "1.1.1"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
41
|
"dist",
|