@tinacms/datalayer 0.0.0 → 0.1.0

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": "@tinacms/datalayer",
3
- "version": "0.0.0",
3
+ "version": "0.1.0",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [
@@ -20,7 +20,7 @@
20
20
  "scripts": {
21
21
  "types": "yarn tsc",
22
22
  "build": "echo \"Run `yarn build` from the root of the repository instead\"",
23
- "test": "jest"
23
+ "test": "jest --passWithNoTests"
24
24
  },
25
25
  "dependencies": {
26
26
  "@octokit/auth-app": "^2.6.0",
@@ -32,7 +32,9 @@
32
32
  "graphql": "^15.3.0",
33
33
  "gray-matter": "^4.0.2",
34
34
  "js-yaml": "^3.14.0",
35
+ "jsonpath-plus": "^6.0.1",
35
36
  "level": "^7.0.1",
37
+ "leveldown": "^6.1.0",
36
38
  "levelup": "^5.1.1",
37
39
  "lodash": "^4.17.20",
38
40
  "memdown": "^6.1.1",
@@ -48,9 +50,9 @@
48
50
  "directory": "packages/@tinacms/datalayer"
49
51
  },
50
52
  "devDependencies": {
51
- "@tinacms/scripts": "0.50.4",
53
+ "@tinacms/scripts": "0.50.7",
52
54
  "@types/fs-extra": "^9.0.2",
53
- "@types/jest": "^26.0.4",
55
+ "@types/jest": "^27.4.1",
54
56
  "@types/js-yaml": "^3.12.5",
55
57
  "@types/level": "^6.0.0",
56
58
  "@types/lodash": "^4.14.161",
@@ -1,33 +0,0 @@
1
- /**
2
- Copyright 2021 Forestry.io Holdings, Inc.
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
- http://www.apache.org/licenses/LICENSE-2.0
7
- Unless required by applicable law or agreed to in writing, software
8
- distributed under the License is distributed on an "AS IS" BASIS,
9
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- See the License for the specific language governing permissions and
11
- limitations under the License.
12
- */
13
- import { Octokit } from '@octokit/rest';
14
- import { Bridge } from '.';
15
- export declare type GithubManagerInit = {
16
- rootPath: string;
17
- accessToken: string;
18
- owner: string;
19
- repo: string;
20
- ref: string;
21
- };
22
- export declare class GithubBridge implements Bridge {
23
- rootPath: string;
24
- repoConfig: Pick<GithubManagerInit, 'owner' | 'ref' | 'repo'>;
25
- appOctoKit: Octokit;
26
- constructor({ rootPath, accessToken, owner, repo, ref }: GithubManagerInit);
27
- private readDir;
28
- supportsBuilding(): boolean;
29
- glob(pattern: string): Promise<string[]>;
30
- get(filepath: string): Promise<string>;
31
- putConfig(filepath: string, data: string): Promise<void>;
32
- put(filepath: string, data: string): Promise<void>;
33
- }
@@ -1,37 +0,0 @@
1
- /**
2
- Copyright 2021 Forestry.io Holdings, Inc.
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
- http://www.apache.org/licenses/LICENSE-2.0
7
- Unless required by applicable law or agreed to in writing, software
8
- distributed under the License is distributed on an "AS IS" BASIS,
9
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- See the License for the specific language governing permissions and
11
- limitations under the License.
12
- */
13
- import { Octokit } from '@octokit/rest';
14
- import { Store } from '.';
15
- export declare type GithubManagerInit = {
16
- rootPath: string;
17
- accessToken: string;
18
- owner: string;
19
- repo: string;
20
- ref: string;
21
- };
22
- export declare class GithubStore implements Store {
23
- rootPath: string;
24
- repoConfig: Pick<GithubManagerInit, 'owner' | 'ref' | 'repo'>;
25
- appOctoKit: Octokit;
26
- clear(): Promise<void>;
27
- print(): Promise<void>;
28
- constructor({ rootPath, accessToken, owner, repo, ref }: GithubManagerInit);
29
- query(queryStrings: string[]): Promise<object[]>;
30
- supportsSeeding(): boolean;
31
- seed(): Promise<void>;
32
- private readDir;
33
- glob(pattern: string, callback: any): Promise<any[]>;
34
- get(filepath: string): Promise<never>;
35
- supportsIndexing(): boolean;
36
- put(filepath: string, data: object): Promise<void>;
37
- }
@@ -1,33 +0,0 @@
1
- /**
2
- Copyright 2021 Forestry.io Holdings, Inc.
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
- http://www.apache.org/licenses/LICENSE-2.0
7
- Unless required by applicable law or agreed to in writing, software
8
- distributed under the License is distributed on an "AS IS" BASIS,
9
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- See the License for the specific language governing permissions and
11
- limitations under the License.
12
- */
13
- import type { Store } from './index';
14
- /**
15
- * This is the bridge from whatever datasource we need for I/O.
16
- * The basic example here is for the filesystem, one is needed
17
- * for Github has well.
18
- */
19
- export declare class MemoryStore implements Store {
20
- rootPath: any;
21
- db: any;
22
- private map;
23
- constructor(rootPath: string, object?: object);
24
- query(queryStrings: string[], hydrator: any): Promise<any[]>;
25
- seed(filepath: string, data: object): Promise<void>;
26
- supportsSeeding(): boolean;
27
- supportsIndexing(): boolean;
28
- print(): Promise<void>;
29
- clear(): Promise<void>;
30
- glob(pattern: string, callback: any): Promise<any[]>;
31
- get(filepath: string): Promise<any>;
32
- put(filepath: string, data: object): Promise<void>;
33
- }