-
Notifications
You must be signed in to change notification settings - Fork 800
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into update/unbundle-publicize-from-jetpack
- Loading branch information
Showing
128 changed files
with
1,682 additions
and
208 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,7 @@ | ||
# Files not needed to be distributed in the package. | ||
.gitattributes export-ignore | ||
node_modules export-ignore | ||
|
||
# Files to exclude from the mirror repo | ||
/changelog/** production-exclude | ||
/.eslintrc.cjs production-exclude |
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,2 @@ | ||
vendor/ | ||
node_modules/ |
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,6 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
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,15 @@ | ||
# Scrip Helpers | ||
|
||
A library to provide data for script handles and the corresponding utility functions for Jetpack. | ||
|
||
## Contribute | ||
|
||
## Get Help | ||
|
||
## Security | ||
|
||
Need to report a security vulnerability? Go to [https://automattic.com/security/](https://automattic.com/security/) or directly to our security bug bounty site [https://hackerone.com/automattic](https://hackerone.com/automattic). | ||
|
||
## License | ||
|
||
publicize is licensed under [GNU General Public License v2 (or later)](./LICENSE.txt) |
Empty file.
4 changes: 4 additions & 0 deletions
4
projects/js-packages/script-data/changelog/add-consolidate-initial-state
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,4 @@ | ||
Significance: minor | ||
Type: added | ||
|
||
Added jetpack-script-data package to consolidate the logic for Jetpack Initial state |
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,34 @@ | ||
{ | ||
"name": "automattic/jetpack-script-data", | ||
"description": "A library to provide data for script handles and the corresponding utility functions for Jetpack.", | ||
"type": "library", | ||
"license": "GPL-2.0-or-later", | ||
"require": {}, | ||
"require-dev": { | ||
"automattic/jetpack-changelogger": "@dev" | ||
}, | ||
"autoload": { | ||
"classmap": [ | ||
"src/" | ||
] | ||
}, | ||
"scripts": {}, | ||
"repositories": [ | ||
{ | ||
"type": "path", | ||
"url": "../../packages/*", | ||
"options": { | ||
"monorepo": true | ||
} | ||
} | ||
], | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"extra": { | ||
"mirror-repo": "Automattic/jetpack-script-data", | ||
"changelogger": { | ||
"link-template": "https://github.com/Automattic/jetpack-script-data/compare/v${old}...v${new}" | ||
}, | ||
"autotagger": true | ||
} | ||
} |
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,24 @@ | ||
{ | ||
"private": true, | ||
"name": "@automattic/jetpack-script-data", | ||
"version": "0.1.0-alpha", | ||
"description": "A library to provide data for script handles and the corresponding utility functions for Jetpack.", | ||
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/script-data/#readme", | ||
"bugs": { | ||
"url": "https://github.com/Automattic/jetpack/labels/[JS Package] Script Data" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Automattic/jetpack.git", | ||
"directory": "projects/js-packages/script-data" | ||
}, | ||
"license": "GPL-2.0-or-later", | ||
"author": "Automattic", | ||
"type": "module", | ||
"scripts": {}, | ||
"dependencies": {}, | ||
"devDependencies": {}, | ||
"exports": { | ||
".": "./src/index.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,2 @@ | ||
export * from './types'; | ||
export * from './utils'; |
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,49 @@ | ||
export interface SitePlan { | ||
product_slug: string; | ||
features?: { | ||
active: Array< string >; | ||
available?: Record< string, Array< string > >; | ||
}; | ||
} | ||
|
||
export interface WPCOMSiteData { | ||
blog_id: number; | ||
} | ||
|
||
export interface PublicSiteData { | ||
icon: string; | ||
title: string; | ||
} | ||
|
||
export interface AdminSiteData { | ||
admin_url: string; | ||
date_format: string; | ||
is_multisite: boolean; | ||
plan: SitePlan; | ||
rest_nonce: string; | ||
rest_root: string; | ||
wp_version: string; | ||
wpcom: WPCOMSiteData; | ||
} | ||
|
||
export interface SiteData extends PublicSiteData, Partial< AdminSiteData > {} | ||
|
||
export interface CurrentUserData { | ||
id: number; | ||
display_name: string; | ||
} | ||
|
||
export interface UserData { | ||
current_user: CurrentUserData; | ||
} | ||
|
||
export interface JetpackScriptData { | ||
site: SiteData; | ||
user: UserData; | ||
} | ||
|
||
declare global { | ||
interface Window { | ||
JetpackScriptData: JetpackScriptData; | ||
} | ||
} |
Oops, something went wrong.