-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added imports to project manifest (not yet used in cli)
- Loading branch information
1 parent
7b52e35
commit 2e503ed
Showing
25 changed files
with
878 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
packages/js/manifests/polywrap/src/formats/polywrap.app/0.6.0.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
/* tslint:disable */ | ||
/** | ||
* This file was automatically generated by json-schema-to-typescript. | ||
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, | ||
* and run json-schema-to-typescript to regenerate this file. | ||
*/ | ||
|
||
export interface AppManifest { | ||
/** | ||
* Polywrap manifest format version. | ||
*/ | ||
format: "0.6.0"; | ||
/** | ||
* Basic project properties. | ||
*/ | ||
project: { | ||
/** | ||
* Name of this project. | ||
*/ | ||
name: string; | ||
/** | ||
* Type of this project. | ||
*/ | ||
type: string; | ||
}; | ||
/** | ||
* Project source files. | ||
*/ | ||
source?: { | ||
/** | ||
* Path to the project's graphql schema. | ||
*/ | ||
schema?: string; | ||
}; | ||
/** | ||
* Specify URIs to be used to import ABIs in your schema. | ||
*/ | ||
imports?: { | ||
/** | ||
* This interface was referenced by `undefined`'s JSON-Schema definition | ||
* via the `patternProperty` ".*". | ||
*/ | ||
[k: string]: ImportUri | string; | ||
}; | ||
/** | ||
* Specify redirects from import URIs to ABIs on your filesystem. | ||
*/ | ||
import_abis?: ImportAbi[]; | ||
__type: "AppManifest"; | ||
} | ||
export interface ImportUri { | ||
/** | ||
* Wrap URI to import. | ||
*/ | ||
uri: string; | ||
/** | ||
* List of types to import from Wrap (defaults to all). | ||
*/ | ||
types?: string[]; | ||
/** | ||
* List of functions to import from Wrap (defaults to all). | ||
*/ | ||
functions?: string[]; | ||
} | ||
export interface ImportAbi { | ||
/** | ||
* Import URI | ||
*/ | ||
uri: string; | ||
/** | ||
* Path to a local ABI (or schema). Supported file formats: [*.graphql, *.info, *.json, *.yaml] | ||
*/ | ||
abi: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
packages/js/manifests/polywrap/src/formats/polywrap.app/migrators/0.5.0_to_0.6.0.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { AppManifest as OldManifest } from "../0.5.0"; | ||
import { AppManifest as NewManifest } from "../0.6.0"; | ||
|
||
export function migrate(migrate: OldManifest): NewManifest { | ||
const newManifest: Partial<NewManifest> = { | ||
...migrate, | ||
format: "0.6.0", | ||
}; | ||
if (migrate.source) { | ||
newManifest["source"] = {}; | ||
if (migrate.source.schema) { | ||
newManifest.source["schema"] = migrate.source.schema; | ||
} | ||
if (migrate.source.import_abis) { | ||
newManifest["import_abis"] = migrate.source.import_abis; | ||
} | ||
} | ||
return newManifest as NewManifest; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
packages/js/manifests/polywrap/src/formats/polywrap.plugin/0.6.0.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
/* tslint:disable */ | ||
/** | ||
* This file was automatically generated by json-schema-to-typescript. | ||
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, | ||
* and run json-schema-to-typescript to regenerate this file. | ||
*/ | ||
|
||
export interface PluginManifest { | ||
/** | ||
* Polywrap manifest format version. | ||
*/ | ||
format: "0.6.0"; | ||
/** | ||
* Basic project properties. | ||
*/ | ||
project: { | ||
/** | ||
* Name of this project. | ||
*/ | ||
name: string; | ||
/** | ||
* Type of this project. | ||
*/ | ||
type: string; | ||
}; | ||
/** | ||
* Project source files. | ||
*/ | ||
source?: { | ||
/** | ||
* Path to the project's entry point. | ||
*/ | ||
module?: string; | ||
/** | ||
* Path to the project's graphql schema. | ||
*/ | ||
schema?: string; | ||
}; | ||
/** | ||
* Specify URIs to be used to import ABIs in your schema. | ||
*/ | ||
imports?: { | ||
/** | ||
* This interface was referenced by `undefined`'s JSON-Schema definition | ||
* via the `patternProperty` ".*". | ||
*/ | ||
[k: string]: ImportUri | string; | ||
}; | ||
/** | ||
* Specify redirects from import URIs to ABIs on your filesystem. | ||
*/ | ||
import_abis?: ImportAbi[]; | ||
__type: "PluginManifest"; | ||
} | ||
export interface ImportUri { | ||
/** | ||
* Wrap URI to import. | ||
*/ | ||
uri: string; | ||
/** | ||
* List of types to import from Wrap (defaults to all). | ||
*/ | ||
types?: string[]; | ||
/** | ||
* List of functions to import from Wrap (defaults to all). | ||
*/ | ||
functions?: string[]; | ||
} | ||
export interface ImportAbi { | ||
/** | ||
* Import URI | ||
*/ | ||
uri: string; | ||
/** | ||
* Path to a local ABI (or schema). Supported file formats: [*.graphql, *.info, *.json, *.yaml] | ||
*/ | ||
abi: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.