Skip to content

Commit

Permalink
fix: Salesforce CPQ formConfig.json wasn't packaged.
Browse files Browse the repository at this point in the history
Store formConfig.json as .ts for now.
  • Loading branch information
amtrack committed Oct 28, 2024
1 parent dfb187d commit 2db9715
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
{
export type FormConfig = {
[key: string]: {
label: string;
component: string; // 'tab'
id: string;
properties: {
[key: string]: {
label: string;
component: string; // 'input' | 'select'
type: string; // 'string' | 'boolean' | 'number'
name: string;
immediatelySave?: boolean;
};
};
};
};

export const formConfig: FormConfig = {
"documents": {
"label": "Documents",
"component": "tab",
Expand Down
11 changes: 1 addition & 10 deletions src/plugins/salesforce-cpq-config/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import { readFileSync } from 'node:fs';
import { BrowserforcePlugin } from '../../plugin.js';
import { FormConfig } from './types.js';

// import formConfig from './formConfig.json' with { type: 'json'};
const formConfig: FormConfig = JSON.parse(
readFileSync(
new URL('./formConfig.json', import.meta.url),
"utf8"
)
);
import { formConfig } from './formConfig.js';

const PATHS = {
BASE: '0A3?setupid=ImportedPackage&retURL=%2Fui%2Fsetup%2FSetup%3Fsetupid%3DStudio'
Expand Down
16 changes: 0 additions & 16 deletions src/plugins/salesforce-cpq-config/types.ts

This file was deleted.

0 comments on commit 2db9715

Please sign in to comment.