Socket
Socket
Sign inDemoInstall

@stackbit/types

Package Overview
Dependencies
Maintainers
12
Versions
291
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stackbit/types - npm Package Compare versions

Comparing version 0.1.11-cloudinary-presets.0 to 0.1.11-gitcms.0

2

dist/content-source-document.d.ts

@@ -155,4 +155,2 @@ import type { FieldType } from './model-fields';

type: 'image';
source?: string;
sourceData?: any;
};

@@ -159,0 +157,0 @@ export declare type DocumentImageFieldProps = {

39

dist/content-source.d.ts

@@ -6,3 +6,3 @@ /// <reference types="node" />

import type { Logger } from './logger';
import type { Document, Asset, TypeDocument, TypeAsset } from './content-source-document';
import type { Document, Asset, TypeDocument, TypeAsset, DocumentStatus } from './content-source-document';
import type { UpdateOperation, UpdateOperationField } from './content-source-operation';

@@ -110,2 +110,38 @@ export interface ContentSourceInterface<UserContext = unknown, DocumentContext = unknown, AssetContext = unknown> {

}
export declare type RunResult = {
stdout: string;
stderr: string;
exitCode?: number;
err?: Error;
};
export interface RunServiceInterface {
command: (command: string, args: string[], cwd?: string, shell?: boolean) => Promise<RunResult>;
}
export interface GitFileObject {
filePath: string;
description: string;
}
export interface GitAuthor {
name?: string;
email: string;
}
export interface GitCommitLogEntry {
author: string;
timestamp: Date;
commitHash: string;
changes: [DocumentStatus, string][];
}
export interface GitServiceInterface {
commitAndPush: (author: GitAuthor, files: GitFileObject[]) => Promise<void>;
publish(author: GitAuthor, filePaths?: string[]): Promise<void>;
commitLog(): Promise<GitCommitLogEntry[]>;
diff(): Promise<string[]>;
}
export interface ContentSourceServices {
git: GitServiceInterface;
run: RunServiceInterface;
}
export interface ContentSourceDelegate {
services: ContentSourceServices;
}
export interface InitOptions {

@@ -118,2 +154,3 @@ logger: Logger;

devAppRestartNeeded?: () => void;
delegate: ContentSourceDelegate;
}

@@ -120,0 +157,0 @@ export declare type UserCommandSpawner = (options: SpawnUserCommandOptions) => ChildProcessWithoutNullStreams;

{
"name": "@stackbit/types",
"version": "0.1.11-cloudinary-presets.0",
"version": "0.1.11-gitcms.0",
"description": "Types for Stackbit config and Content Source Interface",

@@ -42,3 +42,3 @@ "main": "dist/index.js",

},
"gitHead": "0df21f02c731c795a86e7de349dcd910063a8779"
"gitHead": "ea7067c13e7c4710dd2ef23bace3eb9f39990136"
}

@@ -254,4 +254,2 @@ import type { FieldType } from './model-fields';

type: 'image';
source?: string;
sourceData?: any;
};

@@ -258,0 +256,0 @@ export type DocumentImageFieldProps = {

import type { ChildProcessWithoutNullStreams } from 'child_process';
import type { Model } from './models';
import type { Logger } from './logger';
import type { Document, Asset, TypeDocument, TypeAsset } from './content-source-document';
import type { Document, Asset, TypeDocument, TypeAsset, DocumentStatus } from './content-source-document';
import type { UpdateOperation, UpdateOperationField } from './content-source-operation';

@@ -112,2 +112,41 @@

export type RunResult = { stdout: string, stderr: string; exitCode?: number; err?: Error };
export interface RunServiceInterface {
command: (command: string, args: string[], cwd?: string, shell?: boolean) => Promise<RunResult>;
}
export interface GitFileObject {
filePath: string;
description: string;
}
export interface GitAuthor {
name?: string;
email: string;
}
export interface GitCommitLogEntry {
author: string;
timestamp: Date;
commitHash: string;
changes: [DocumentStatus, string][];
}
export interface GitServiceInterface {
commitAndPush: (author: GitAuthor, files: GitFileObject[]) => Promise<void>;
publish(author: GitAuthor, filePaths?: string[]): Promise<void>;
commitLog(): Promise<GitCommitLogEntry[]>;
diff(): Promise<string[]>;
}
export interface ContentSourceServices {
git: GitServiceInterface;
run: RunServiceInterface;
}
export interface ContentSourceDelegate {
services: ContentSourceServices;
}
export interface InitOptions {

@@ -120,2 +159,3 @@ logger: Logger;

devAppRestartNeeded?: () => void;
delegate: ContentSourceDelegate;
}

@@ -122,0 +162,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc