九亿商家端静态页
This commit is contained in:
parent
56ab4cb220
commit
61537cc3bd
|
@ -0,0 +1,12 @@
|
|||
<script>
|
||||
export default {
|
||||
onLaunch() {},
|
||||
onShow() {},
|
||||
onHide() {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/*每个页面公共css */
|
||||
@import "./common/css/style.scss";
|
||||
</style>
|
|
@ -0,0 +1,76 @@
|
|||
// 工具库
|
||||
import util from '@/common/js/util.js'
|
||||
|
||||
// 卷轴积分
|
||||
export const durian = {
|
||||
/**
|
||||
* 果树列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
durianList(param) {
|
||||
return util.request({
|
||||
url: `/coreplay/duriantreeinfo/tree-list`,
|
||||
method: 'GET',
|
||||
query: param.query,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 榴莲果释放明细
|
||||
* @param {Object} param
|
||||
*/
|
||||
getLog(param) {
|
||||
return util.request({
|
||||
url: `/coreplay/durianfruitdetail/getDetailInfoByTreeId`,
|
||||
method: 'GET',
|
||||
query: param.query,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 我的榴莲果树
|
||||
* @param {Object} param
|
||||
*/
|
||||
buyDurianList(param) {
|
||||
return util.request({
|
||||
url: `/coreplay/duriantreeinfo/boughtListByUser`,
|
||||
method: 'GET',
|
||||
query: param.query,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 榴莲果置换
|
||||
* @param {Object} param
|
||||
*/
|
||||
exchange(param) {
|
||||
return util.request({
|
||||
url: `/coreplay/duriantreeinfo/exchange`,
|
||||
method: 'POST',
|
||||
data: param.data,
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 校验姓名
|
||||
* @param {Object} param
|
||||
*/
|
||||
nameComparison(param) {
|
||||
return util.request({
|
||||
url: `/coreplay/app/durian/nameComparison`,
|
||||
method: 'GET',
|
||||
query: param.query,
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 交易榴莲果
|
||||
* @param {Object} param
|
||||
*/
|
||||
consume(param) {
|
||||
return util.request({
|
||||
url: `/coreplay/app/durian/consume`,
|
||||
method: 'POST',
|
||||
data: param.data,
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
}
|
||||
export default durian
|
|
@ -0,0 +1,74 @@
|
|||
// 工具库
|
||||
import util from '@/common/js/util.js'
|
||||
// 登录模块
|
||||
import login from '@/api/login.js'
|
||||
// 用户信息
|
||||
import mine from '@/api/mine.js'
|
||||
// 消息
|
||||
import news from '@/api/news.js'
|
||||
// 商城
|
||||
import shop from '@/api/shop.js'
|
||||
|
||||
const api = {
|
||||
// 登录
|
||||
login,
|
||||
// 我的
|
||||
mine,
|
||||
// 消息
|
||||
news,
|
||||
// 商城模块
|
||||
shop,
|
||||
// 上传图片地址
|
||||
uploadImg: '/homecommon/upload',
|
||||
// 上传视频地址
|
||||
uploadVideo: '/homecommon/uploadVideo',
|
||||
// 公共模块可以放在这里 比如获取各种文章
|
||||
|
||||
/**
|
||||
* 获取文章
|
||||
* @param {Object} param
|
||||
*/
|
||||
getArticle(param) {
|
||||
return util.request({
|
||||
url: '/user/protocol/inquire',
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取各种配置
|
||||
* @param {Object} param
|
||||
*/
|
||||
getConfig() {
|
||||
return util.request({
|
||||
url: '/coreplay/configinfo/getConf',
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取省市区
|
||||
* @param {Object} param
|
||||
*/
|
||||
getRegion() {
|
||||
return util.request({
|
||||
url: '/shopify/region/all',
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取分类字典数据
|
||||
* @param {Object} param
|
||||
*/
|
||||
getDict(param) {
|
||||
return util.request({
|
||||
url: '/system/dict/data/type',
|
||||
path: param.path,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
export default api
|
|
@ -0,0 +1,119 @@
|
|||
// 工具库
|
||||
import util from '@/common/js/util.js'
|
||||
|
||||
// 卷轴积分
|
||||
const intergral = {
|
||||
/**
|
||||
* 卷轴列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
scrollList(param) {
|
||||
return util.request({
|
||||
url: `/coreplay/app/scrollinfo/scroll-list`,
|
||||
method: 'GET',
|
||||
query: param.query,
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 我购买的卷轴列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
buyScrollList(param) {
|
||||
return util.request({
|
||||
url: `/coreplay/app/scrollinfo/boughtListByUser`,
|
||||
method: 'GET',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 查看卷轴(按id)
|
||||
* @param {Object} param
|
||||
*/
|
||||
scrollinfo(param) {
|
||||
return util.request({
|
||||
url: `/coreplay/app/scrollinfo`,
|
||||
method: 'GET',
|
||||
path: param.path,
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 按用户id按日期查卷轴积分明细
|
||||
* @param {Object} param
|
||||
*/
|
||||
getDetailInfoByDate(param) {
|
||||
return util.request({
|
||||
url: `/coreplay/app/scrollinfo/getDetailInfoByDate`,
|
||||
method: 'GET',
|
||||
query: param.query,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 按卷轴id查卷轴积分明细
|
||||
* @param {Object} param
|
||||
*/
|
||||
getDetailInfoByScrollId(param) {
|
||||
return util.request({
|
||||
url: `/coreplay/app/scrollinfo/getDetailInfoByScrollId`,
|
||||
method: 'GET',
|
||||
path: param.path,
|
||||
query: param.query,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 按用户id查卷轴积分明细
|
||||
* @param {Object} param
|
||||
*/
|
||||
getDetailInfoByUserId(param) {
|
||||
return util.request({
|
||||
url: `/coreplay/app/scrollinfo/getDetailInfoByUserId`,
|
||||
method: 'GET',
|
||||
query: param.query,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 今日任务读秒记录
|
||||
* @param {Object} param
|
||||
*/
|
||||
viewingTasks(param) {
|
||||
return util.request({
|
||||
url: `/video/Effective/return`,
|
||||
method: 'GET',
|
||||
query: param.query,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 购买卷轴
|
||||
* @param {Object} param
|
||||
*/
|
||||
buyScroll(param) {
|
||||
return util.request({
|
||||
url: `/coreplay/app/scrollinfo/buyScroll`,
|
||||
method: 'POST',
|
||||
query: param.query,
|
||||
data: param.data,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取二维码
|
||||
* @param {Object} param
|
||||
*/
|
||||
myQrcode(param) {
|
||||
return util.request({
|
||||
url: `/user/team/getH5Link`,
|
||||
method: 'GET',
|
||||
data: param.data,
|
||||
responseType: 'arraybuffer',
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
export default intergral
|
|
@ -0,0 +1,44 @@
|
|||
// 工具库
|
||||
import util from '@/common/js/util.js'
|
||||
|
||||
// 登录模块
|
||||
const login = {
|
||||
/**
|
||||
* 获取验证码
|
||||
* @param {Object} param
|
||||
*/
|
||||
getCaptcha(param) {
|
||||
return util.request({
|
||||
url: '/user/sendVerifyCode',
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户密码登录接口
|
||||
* @param {Object} param
|
||||
*/
|
||||
userLoginByPassword(param) {
|
||||
return util.request({
|
||||
url: '/user/login',
|
||||
data: param.data,
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取腾讯云IM
|
||||
* @param {Object} param
|
||||
*/
|
||||
getIMToken(param) {
|
||||
return util.request({
|
||||
url: '/user/chat/getUserSig',
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
export default login
|
|
@ -0,0 +1,237 @@
|
|||
// 工具库
|
||||
import util from '@/common/js/util.js'
|
||||
|
||||
// 我的模块
|
||||
const mine = {
|
||||
/**
|
||||
* 获取用户信息
|
||||
* @param {Object} param
|
||||
*/
|
||||
getUserinfo(param) {
|
||||
return util.request({
|
||||
url: `/user/getUserData`,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 修改用户信息
|
||||
* @param {Object} param
|
||||
*/
|
||||
updateUserInfo(param) {
|
||||
return util.request({
|
||||
url: `/user/updateUserData`,
|
||||
data: param.data,
|
||||
method: 'PUT',
|
||||
load: 1,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 开启青少年模式
|
||||
* @param {Object} param
|
||||
*/
|
||||
adolescentOpen(param) {
|
||||
return util.request({
|
||||
url: `/user/adolescent/open`,
|
||||
data: param.data,
|
||||
method: 'GET',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 青少年模式解锁
|
||||
* @param {Object} param
|
||||
*/
|
||||
adolescentClose(param) {
|
||||
return util.request({
|
||||
url: `/user/adolescent`,
|
||||
path: param.path,
|
||||
method: 'GET',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取我的评论
|
||||
* @param {Object} param
|
||||
*/
|
||||
myComment(param) {
|
||||
return util.request({
|
||||
url: `/user/home/myComment`,
|
||||
query: param.query,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 验证实名信息是否填写
|
||||
* @param {Object} param
|
||||
*/
|
||||
isCertification(param) {
|
||||
return util.request({
|
||||
url: `/user/isCertification`,
|
||||
query: param.query,
|
||||
method: 'POST',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 实名认证
|
||||
* @param {Object} param
|
||||
*/
|
||||
certification(param) {
|
||||
return util.request({
|
||||
url: `/user/info/certification`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询我的钱包接口
|
||||
* @param {Object} param
|
||||
*/
|
||||
selectPurse(param) {
|
||||
return util.request({
|
||||
url: '/user/selectPurse',
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取待释放列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
releasedList(param) {
|
||||
return util.request({
|
||||
url: '/user/released/list',
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 根据用户账号查询用户id
|
||||
* @param {Object} param
|
||||
*/
|
||||
getUserDataByAccount(param) {
|
||||
return util.request({
|
||||
url: '/coreplay/app/durian/getUserDataByAccount',
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 设置二级密码
|
||||
* @param {Object} param
|
||||
*/
|
||||
setSecondLevelCipher(param) {
|
||||
return util.request({
|
||||
url: '/user/user/setSecondLevelCipher',
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 验证二级密码
|
||||
* @param {Object} param
|
||||
*/
|
||||
checkSecondLevelCipher(param) {
|
||||
return util.request({
|
||||
url: '/user/user/checkSecondLevelCipher',
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 返回绑定微信 支付宝账号
|
||||
*/
|
||||
getBindAccount() {
|
||||
return util.request({
|
||||
url: '/user/Bind/getBindAccount',
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 绑定支付宝账号和微信账号
|
||||
* @param {Object} param
|
||||
*/
|
||||
bindAccount(param) {
|
||||
return util.request({
|
||||
url: '/user/Bind/account',
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 意见反馈
|
||||
* @param {Object} param
|
||||
*/
|
||||
feedback(param) {
|
||||
return util.request({
|
||||
url: '/user/protocol/feedback',
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查看用户支付排序
|
||||
* @param {Object} param
|
||||
*/
|
||||
getPaymentOrder(param) {
|
||||
return util.request({
|
||||
url: '/user/paymentOrder/getPaymentOrder',
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 修改用户支付排序
|
||||
* @param {Object} param
|
||||
*/
|
||||
updatePaymentOrder(param) {
|
||||
return util.request({
|
||||
url: '/user/paymentOrder/updatePaymentOrder',
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 支付
|
||||
* @param {Object} param
|
||||
*/
|
||||
recharge(param) {
|
||||
return util.request({
|
||||
url: '/user/alipay/recharge',
|
||||
query: param.query,
|
||||
method: 'POST',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取收益列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
getGetList(param) {
|
||||
return util.request({
|
||||
url: '/user/profitSharingRecord/find',
|
||||
data: param.data,
|
||||
query: param.query,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
export default mine
|
|
@ -0,0 +1,212 @@
|
|||
// 工具库
|
||||
import util from '@/common/js/util.js'
|
||||
|
||||
export const news = {
|
||||
/**
|
||||
* 获取腾讯云用户签名
|
||||
* @param {Object} param
|
||||
*/
|
||||
getUserSig(param) {
|
||||
return util.request({
|
||||
url: `/user/chat/getUserSig`,
|
||||
method: 'GET',
|
||||
query: param.query
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 搜索用户
|
||||
* @param {Object} param
|
||||
*/
|
||||
searchUsers(param) {
|
||||
return util.request({
|
||||
url: `/user/chat/searchUsers`,
|
||||
method: 'GET',
|
||||
query: param.query
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 设置好友备注
|
||||
* @param {Object} param
|
||||
*/
|
||||
setNotes(param) {
|
||||
return util.request({
|
||||
url: `/user/friend/setNotes`,
|
||||
method: 'POST',
|
||||
query: param.query
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除好友
|
||||
* @param {Object} param
|
||||
*/
|
||||
deleteFriend(param) {
|
||||
return util.request({
|
||||
url: `/user/chat/relation/deleteFriend`,
|
||||
method: 'DELETE',
|
||||
query: param.query,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 添加好友
|
||||
* @param {Object} param
|
||||
*/
|
||||
addFriend(param) {
|
||||
return util.request({
|
||||
url: `/user/chat/relation/addFriend`,
|
||||
method: 'POST',
|
||||
data: param.data,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 好友申请列表-分页
|
||||
* @param {Object} param
|
||||
*/
|
||||
getFriendListPage(param) {
|
||||
return util.request({
|
||||
url: `/user/friend/getFriendListPage`,
|
||||
path: param.path,
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 根据用户名模糊搜索好友-分页
|
||||
* @param {Object} param
|
||||
*/
|
||||
searchFriendByName(param) {
|
||||
return util.request({
|
||||
url: `/user/friend/searchFriendByName`,
|
||||
path: param.path,
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 创建群聊
|
||||
* @param {Object} param
|
||||
*/
|
||||
addChatGroup(param) {
|
||||
return util.request({
|
||||
url: `/user/chat/group/addChatGroup`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取群聊列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
myGroups(param) {
|
||||
return util.request({
|
||||
url: `/user/chat/group/myGroups`,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 商品列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
getImToken(param) {
|
||||
return util.request({
|
||||
url: `/im/token/getUserAppToken`,
|
||||
method: 'get',
|
||||
query: param
|
||||
})
|
||||
},
|
||||
|
||||
// 发红包
|
||||
sendRedPacket(param) {
|
||||
return util.request({
|
||||
url: `/user/sendRedPacket`,
|
||||
method: 'POST',
|
||||
data: param.data,
|
||||
query: param.query,
|
||||
})
|
||||
},
|
||||
|
||||
// 红包详情
|
||||
getRedPacketInfo(param) {
|
||||
return util.request({
|
||||
url: `/user/getRedPacketInfo`,
|
||||
method: 'GET',
|
||||
query: param.query,
|
||||
load: 1,
|
||||
})
|
||||
},
|
||||
|
||||
// 领红包
|
||||
getRedPacket(param) {
|
||||
return util.request({
|
||||
url: `/user/getRedPacket`,
|
||||
method: 'POST',
|
||||
data: param.data,
|
||||
query: param.query,
|
||||
})
|
||||
},
|
||||
|
||||
// 红包记录
|
||||
grabredLog(param) {
|
||||
return util.request({
|
||||
url: `/home/grabredLog`,
|
||||
method: 'POST',
|
||||
query: param
|
||||
})
|
||||
},
|
||||
|
||||
//获取好友列表
|
||||
getFriendList() {
|
||||
return util.request({
|
||||
url: `/user/chat/relation/myFriends`,
|
||||
method: 'GET'
|
||||
})
|
||||
},
|
||||
|
||||
// 获取私聊聊天记录
|
||||
getUserMsgHistory(param) {
|
||||
return util.request({
|
||||
url: `/user/chat/single/getMsgList`,
|
||||
query: param.query,
|
||||
method: 'GET'
|
||||
})
|
||||
},
|
||||
|
||||
// 获取群聊聊天记录
|
||||
getGroupMsgHistory(param) {
|
||||
return util.request({
|
||||
url: `/user/chat/group/getMsgList`,
|
||||
query: param.query,
|
||||
method: 'GET'
|
||||
})
|
||||
},
|
||||
|
||||
// 私聊发消息
|
||||
sendUserMsg(param) {
|
||||
return util.request({
|
||||
url: `/user/chat/single/sendMsg`,
|
||||
query: param.query,
|
||||
data: param.data,
|
||||
method: 'POST'
|
||||
})
|
||||
},
|
||||
|
||||
// 群聊发消息
|
||||
sendGroupMsg(param) {
|
||||
return util.request({
|
||||
url: `/user/chat/group/sendMsg`,
|
||||
query: param.query,
|
||||
data: param.data,
|
||||
method: 'POST'
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
export default news
|
|
@ -0,0 +1,427 @@
|
|||
// 工具库
|
||||
import util from '@/common/js/util.js'
|
||||
|
||||
// 商品
|
||||
const shop = {
|
||||
/**
|
||||
* 商家入驻状态
|
||||
* @param {Object} param
|
||||
*/
|
||||
getShopStatus(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appDeposits/settleStatus`,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 商家缴纳押金
|
||||
* @param {Object} param
|
||||
*/
|
||||
depositsPay(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appDeposits/depositsPay`,
|
||||
load: true,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 商户分类
|
||||
* @param {Object} param
|
||||
*/
|
||||
categoryAll(param) {
|
||||
return util.request({
|
||||
url: `/shopify/merchantCategory/categoryAll`,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 商家申请
|
||||
* @param {Object} param
|
||||
*/
|
||||
application(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appApplication/saveApplication`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取商家申请信息
|
||||
* @param {Object} param
|
||||
*/
|
||||
getStoreDetail(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appApplication/getDetail`,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 退还押金接口
|
||||
* @param {Object} param
|
||||
*/
|
||||
outDepositsPay(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appDeposits/outDepositsPay`,
|
||||
load: true,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 商家发布商品
|
||||
* @param {Object} param
|
||||
*/
|
||||
releaseProduct(param) {
|
||||
return util.request({
|
||||
url: `/shopify/`,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 商品列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
getProduct(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appProductionApi/getProductionList`,
|
||||
method: 'GET',
|
||||
data: param.data
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 商品分类列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
getCategory(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appProductionApi/getProductCategory`,
|
||||
method: 'GET',
|
||||
query: param.query,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 根据商品主键获取商品详情
|
||||
* @param {Object} param
|
||||
*/
|
||||
productDetail(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appProductionApi/getProductionDetail`,
|
||||
method: 'GET',
|
||||
query: param.query,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 添加商品浏览记录
|
||||
* @param {Object} param
|
||||
*/
|
||||
addBrowsing(param) {
|
||||
return util.request({
|
||||
url: `/shopify/system/addBrowsing`,
|
||||
method: 'PUT',
|
||||
data: param.data,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取收货地址
|
||||
* @param {Object} param
|
||||
*/
|
||||
getDefaultAddress(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appAddress/getDefaultOne`,
|
||||
method: 'GET',
|
||||
query: param.query,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取默认收货地址
|
||||
* @param {Object} param
|
||||
*/
|
||||
getAddressList(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appAddress/getList`,
|
||||
method: 'GET',
|
||||
query: param.query,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 保存地址
|
||||
* @param {Object} param
|
||||
*/
|
||||
saveOrUpdate(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appAddress/saveOrUpdate`,
|
||||
method: 'POST',
|
||||
data: param.data,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除收货地址
|
||||
* @param {Object} param
|
||||
*/
|
||||
removeAddressById(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appAddress/deleteById`,
|
||||
method: 'DELETE',
|
||||
query: param.query,
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 保存商品信息
|
||||
* @param {Object} param
|
||||
*/
|
||||
saveProduct(param) {
|
||||
return util.request({
|
||||
url: `/shopify/webProduct/uploadProduct`,
|
||||
method: 'POST',
|
||||
data: param.data,
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 商品收藏
|
||||
* @param {Object} param
|
||||
*/
|
||||
addProductCollect(param) {
|
||||
return util.request({
|
||||
url: `/shopify/collect/addProductCollect`,
|
||||
method: 'POST',
|
||||
query: param.query,
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查看收藏记录
|
||||
* @param {Object} param
|
||||
*/
|
||||
getCollectList(param) {
|
||||
return util.request({
|
||||
url: `/shopify/collect`,
|
||||
method: 'GET',
|
||||
query: param.query,
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 取消 / 关注店铺
|
||||
* @param {Object} param
|
||||
*/
|
||||
followShop(param) {
|
||||
return util.request({
|
||||
url: `/shopify/shopifyFollow/followShop`,
|
||||
method: 'POST',
|
||||
data: param.data,
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取商户详细信息
|
||||
* @param {Object} param
|
||||
*/
|
||||
merchant(param) {
|
||||
return util.request({
|
||||
url: `/shopify/merchant`,
|
||||
method: 'GET',
|
||||
path: param.path,
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 根据用户id查询所有的浏览记录
|
||||
* @param {Object} param
|
||||
*/
|
||||
getHistoryView(param) {
|
||||
return util.request({
|
||||
url: `/shopify/system`,
|
||||
method: 'GET',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取关注店铺列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
getFollowShopList(param) {
|
||||
return util.request({
|
||||
url: `/shopify/shopifyFollow/getFollowShopList`,
|
||||
method: 'GET',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取发布的商品列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
getProductionListByUserId(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appProductionApi/getProductionListByUserId`,
|
||||
data: param.data,
|
||||
method: 'GET',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取发布的商品列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
addOrder(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appOrder/addOrder`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取用户订单列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
getOrderList(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appOrder/getOrderList`,
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取订单详情
|
||||
* @param {Object} param
|
||||
*/
|
||||
getOrderDetail(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appOrder/getOne`,
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 订单支付
|
||||
* @param {Object} param
|
||||
*/
|
||||
orderPay(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appOrder/payOrder`,
|
||||
query: param.query,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 订单取消
|
||||
* @param {Object} param
|
||||
*/
|
||||
orderCancel(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appOrder/cancelOrder`,
|
||||
query: param.query,
|
||||
method: 'PUT',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 订单发起售后
|
||||
* @param {Object} param
|
||||
*/
|
||||
orderAfterSales(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appRefundOrder/addRefund`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 订单确认收货
|
||||
* @param {Object} param
|
||||
*/
|
||||
orderReceived(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appOrder/receivedOrder`,
|
||||
query: param.query,
|
||||
method: 'PUT',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 订单更新收货
|
||||
* @param {Object} param
|
||||
*/
|
||||
orderupdateRefund(param) {
|
||||
return util.request({
|
||||
url: `/shopify/appRefundOrder/updateRefund`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取订单评论规则
|
||||
* @param {Object} param
|
||||
*/
|
||||
getCommentRules(param) {
|
||||
return util.request({
|
||||
url: `/shopify/commentrules/finfAll`,
|
||||
data: param.data,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 商品评论
|
||||
* @param {Object} param
|
||||
*/
|
||||
addProComment(param) {
|
||||
return util.request({
|
||||
url: `/shopify/reviews/add`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 分页查询商品评论列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
getProComment(param) {
|
||||
return util.request({
|
||||
url: `/shopify/reviews/findReviewByProductId`,
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
export default shop
|
|
@ -0,0 +1,27 @@
|
|||
// 工具库
|
||||
import util from '@/common/js/util.js'
|
||||
|
||||
// 我的团队
|
||||
const team = {
|
||||
/**
|
||||
* 我的团队
|
||||
* @param {Object} param
|
||||
*/
|
||||
myTeam(param = {}) {
|
||||
return util.request({
|
||||
url: `/user/team/get`,
|
||||
query: param,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
lowTeam(param) {
|
||||
return util.request({
|
||||
url: `/home/lowTeam`,
|
||||
method: 'post',
|
||||
query: param.query,
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
export default team
|
|
@ -0,0 +1,578 @@
|
|||
// 工具库
|
||||
import util from '@/common/js/util.js'
|
||||
|
||||
// 视频模块
|
||||
const video = {
|
||||
/**
|
||||
* 首页视频分页接口
|
||||
* @param {Object} param
|
||||
*/
|
||||
homeVideo(param) {
|
||||
return util.request({
|
||||
url: `/video/video/list`,
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 发布视频
|
||||
* @param {Object} param
|
||||
*/
|
||||
saveVideo(param) {
|
||||
return util.request({
|
||||
url: `/video/video/add`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 视频 点赞取消赞
|
||||
* @param {Object} param
|
||||
*/
|
||||
videoLike(param) {
|
||||
return util.request({
|
||||
url: `/video/videolike/like`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 观看视频记录接口
|
||||
* @param {Object} param
|
||||
*/
|
||||
browseLog(param) {
|
||||
return util.request({
|
||||
url: `/video/Effective/second`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查看标签分类
|
||||
* @param {Object} param
|
||||
*/
|
||||
getLabel(param) {
|
||||
return util.request({
|
||||
url: `/video/tag/list`,
|
||||
data: param.data,
|
||||
method: 'GET',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 新增或编辑标签
|
||||
* @param {Object} param
|
||||
*/
|
||||
setLabel(param) {
|
||||
return util.request({
|
||||
url: `/video/api/saveTags`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 申请完播量
|
||||
* @param {Object} param
|
||||
*/
|
||||
applyVideo(param) {
|
||||
return util.request({
|
||||
url: `/homecommon/applyVideo`,
|
||||
query: param.query,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 展播量推送
|
||||
* @param {Object} param
|
||||
*/
|
||||
pushVideo(param) {
|
||||
return util.request({
|
||||
url: `/homecommon/pushVideo`,
|
||||
query: param.query,
|
||||
method: 'POST',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 他人用户主页
|
||||
* @param {Object} param
|
||||
*/
|
||||
getUserInfo(param) {
|
||||
return util.request({
|
||||
url: `/user/home/getUserInfo`,
|
||||
query: param.query,
|
||||
method: 'POST',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户视频列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
myVideoList(param) {
|
||||
return util.request({
|
||||
url: `/home/myVideoList`,
|
||||
query: param.query,
|
||||
method: 'POST',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询收藏夹
|
||||
* @param {Object} param
|
||||
*/
|
||||
getCollectList(param) {
|
||||
return util.request({
|
||||
url: `/video/collection/getfavorite`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 添加 / 修改 收藏夹
|
||||
* @param {Object} param
|
||||
*/
|
||||
addfavorite(param) {
|
||||
return util.request({
|
||||
url: `/video/collection/addfavorite`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除收藏夹
|
||||
* @param {Object} param
|
||||
*/
|
||||
deletefavorite(param) {
|
||||
return util.request({
|
||||
url: `/video/collection/deletefavorite`,
|
||||
query: param.query,
|
||||
load: true,
|
||||
method: 'DELETE',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询收藏夹视频
|
||||
* @param {Object} param
|
||||
*/
|
||||
getFavoriteVideo(param) {
|
||||
return util.request({
|
||||
url: `/video/collection/getFavoriteVideo`,
|
||||
query: param.query,
|
||||
load: true,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 往收藏夹添加视频
|
||||
* @param {Object} param
|
||||
*/
|
||||
collectVideo(param) {
|
||||
return util.request({
|
||||
url: `/video/collection/addVideo`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 取消收藏夹中的视频
|
||||
* @param {Object} param
|
||||
*/
|
||||
deleteVideo(param) {
|
||||
return util.request({
|
||||
url: `/video/collection/deleteVideo`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 我的关注视频列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
followVideo(param) {
|
||||
return util.request({
|
||||
url: `/homecommon/followVideo`,
|
||||
query: param.query,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 修改视频信息接口
|
||||
* @param {Object} param
|
||||
*/
|
||||
updateVideo(param) {
|
||||
return util.request({
|
||||
url: `/homecommon/updateVideo`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 视频评论列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
getcomment(param) {
|
||||
return util.request({
|
||||
url: `/video/comment/getcomment`,
|
||||
query: param.query,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 下级评论列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
levelCommentList(param) {
|
||||
return util.request({
|
||||
url: `/home/levelCommentList`,
|
||||
query: param.query,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 发表评论
|
||||
* @param {Object} param
|
||||
*/
|
||||
savecomment(param) {
|
||||
return util.request({
|
||||
url: `/video/comment/savecomment`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 点赞/取消点赞评论
|
||||
* @param {Object} param
|
||||
*/
|
||||
likecomment(param) {
|
||||
return util.request({
|
||||
url: `/video/comment/likecomment`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 热点视频
|
||||
* @param {Object} param
|
||||
*/
|
||||
hotVideos(param) {
|
||||
return util.request({
|
||||
url: `/home/hotVideos`,
|
||||
// query: param.query,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 视频搜索记录
|
||||
* @param {Object} param
|
||||
*/
|
||||
videoSearchLog(param) {
|
||||
return util.request({
|
||||
url: `/home/videoSearchLog`,
|
||||
// query: param.query,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 视频模糊搜索
|
||||
* @param {Object} param
|
||||
*/
|
||||
videoSearch(param) {
|
||||
return util.request({
|
||||
url: `/home/videoSearch`,
|
||||
query: param.query,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 同意好友申请
|
||||
* @param {Object} param
|
||||
*/
|
||||
agreeFriend(param) {
|
||||
return util.request({
|
||||
url: `/user/friend/agreeFriend`,
|
||||
path: param.path,
|
||||
query: param.query,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 拒绝好友申请
|
||||
* @param {Object} param
|
||||
*/
|
||||
refuseFriend(param) {
|
||||
return util.request({
|
||||
url: `/user/friend/refuseFriend`,
|
||||
path: param.path,
|
||||
query: param.query,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 好友列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
getFriendList(param) {
|
||||
return util.request({
|
||||
url: `/user/friend/getFriendList`,
|
||||
path: param.path,
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 关注列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
getFansList(param) {
|
||||
return util.request({
|
||||
url: `/user/attention/getFansList`,
|
||||
path: param.path,
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 关注列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
getAttentionList(param) {
|
||||
return util.request({
|
||||
url: `/user/attention/getAttentionList`,
|
||||
path: param.path,
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 关注用户 关注状态 0:取关 1:关注
|
||||
* @param {Object} param
|
||||
*/
|
||||
attention(param) {
|
||||
return util.request({
|
||||
url: `/user/attention`,
|
||||
path: param.path,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 视频观看权限 (不看他) 0拉黑 1放出
|
||||
* @param {Object} param
|
||||
*/
|
||||
videoBlock(param) {
|
||||
return util.request({
|
||||
url: `/home/videoBlock`,
|
||||
query: param.query,
|
||||
load: true,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 举报视频
|
||||
* @param {Object} param
|
||||
*/
|
||||
reportVideo(param) {
|
||||
return util.request({
|
||||
url: `/report/reportVideo`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 我的喜欢视频列表 分页
|
||||
* @param {Object} param
|
||||
*/
|
||||
myLikeVideoList(param) {
|
||||
return util.request({
|
||||
url: `/video/homepage/myLike`,
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查看历史记录
|
||||
* @param {Object} param
|
||||
*/
|
||||
getHistoryVideoList(param) {
|
||||
return util.request({
|
||||
url: `/video/homepage/history`,
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 视频详情
|
||||
* @param {Object} param
|
||||
*/
|
||||
getVideoById(param) {
|
||||
return util.request({
|
||||
url: `/video/video/getParticulars`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 视频分享
|
||||
* @param {Object} param
|
||||
*/
|
||||
videoShare(param) {
|
||||
return util.request({
|
||||
url: `/home/videoShare`,
|
||||
query: param.query,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 设置闹铃
|
||||
* @param {Object} param
|
||||
*/
|
||||
setAlarm(param) {
|
||||
return util.request({
|
||||
url: `/home/setAlarm`,
|
||||
query: param.query,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查看自己的闹铃
|
||||
*/
|
||||
getAlarm() {
|
||||
return util.request({
|
||||
url: `/home/getAlarm`,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查看我的今日观看任务
|
||||
*/
|
||||
viewingTasks() {
|
||||
return util.request({
|
||||
url: `/home/viewingTasks`,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查看作品
|
||||
*/
|
||||
myWorks(param) {
|
||||
return util.request({
|
||||
url: `/video/homepage/myWorks`,
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取视频流量统计表
|
||||
* @param {Object} param
|
||||
*/
|
||||
getFlow(param) {
|
||||
return util.request({
|
||||
url: `/video/statistics/getStatisticsData/flowStatistics`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取视频统计数据
|
||||
* @param {Object} param
|
||||
*/
|
||||
getStatistics(param) {
|
||||
return util.request({
|
||||
url: `/video/statistics/getStatisticsData`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 消耗流量果解锁统计
|
||||
* @param {Object} param
|
||||
*/
|
||||
unlockStatistics(param) {
|
||||
return util.request({
|
||||
url: `/video/statistics/getStatisticsData/unlockStatistics`,
|
||||
load: true,
|
||||
data: param.data,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 公开赞统计
|
||||
* @param {Object} param
|
||||
*/
|
||||
openLikeData(param) {
|
||||
return util.request({
|
||||
url: `/video/statistics/getStatisticsData/openLikeData`,
|
||||
load: true,
|
||||
query: param.query,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 私密赞统计
|
||||
* @param {Object} param
|
||||
*/
|
||||
PrivacyLikeData(param) {
|
||||
return util.request({
|
||||
url: `/video/statistics/getStatisticsData/PrivacyLikeData`,
|
||||
load: true,
|
||||
query: param.query,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
export default video
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,35 @@
|
|||
// 配置
|
||||
const config = {
|
||||
// 接口域名
|
||||
// #ifdef H5
|
||||
host: 'http://localhost:5173',
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
host: 'http://91f.xyz:8080',
|
||||
// host: 'http://192.168.0.110:8080',
|
||||
// host: 'http://192.168.0.105:8080',
|
||||
// host: 'http://192.168.0.114:8080',
|
||||
// #endif
|
||||
// 支付方式配置
|
||||
payType: {
|
||||
score: {
|
||||
name: '积分',
|
||||
icon: '/static/score.png',
|
||||
},
|
||||
balance: {
|
||||
name: '余额',
|
||||
icon: '/static/balance.png',
|
||||
},
|
||||
},
|
||||
// 腾讯im聊天
|
||||
TChat: {
|
||||
// appid
|
||||
SDKAppID: '1600067241',
|
||||
// 验签
|
||||
secretKey: '955ac1c071050fe1ed0be74470409495cfb4faa5faf7c88ea58b585890433708',
|
||||
//
|
||||
userSig: '',
|
||||
},
|
||||
}
|
||||
|
||||
export default config
|
|
@ -0,0 +1,133 @@
|
|||
// 工具库
|
||||
import util from '@/common/js/util.js'
|
||||
// api
|
||||
import api from '@/api/index.js'
|
||||
|
||||
const order = {
|
||||
/**
|
||||
* 订单取消
|
||||
* @param {Object} event 事件对象
|
||||
*/
|
||||
orderCancel: (event) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
util.alert({
|
||||
content: '取消订单后不可恢复,确认取消订单?',
|
||||
}).then(res => {
|
||||
if (!res.confirm) return
|
||||
//
|
||||
return api.shop.orderCancel({
|
||||
query: {
|
||||
id: event.orderId,
|
||||
},
|
||||
})
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
resolve(res.data)
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: res.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 订单支付
|
||||
* @param {Object} event 事件对象
|
||||
*/
|
||||
orderPay(event) {
|
||||
uni.navigateTo({
|
||||
url: util.setUrl('/pages/shop/commodity/payment', {
|
||||
orderId: event.id,
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查看物流
|
||||
* @param {Object} event 事件对象
|
||||
*/
|
||||
logistics(event) {
|
||||
uni.navigateTo({
|
||||
url: util.setUrl('/pages/shop/order/logistics', {
|
||||
orderId: event.id,
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 订单确认收货
|
||||
* @param {Object} event 事件对象
|
||||
*/
|
||||
orderReceived: (event) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
api.shop.orderReceived({
|
||||
query: {
|
||||
id: event.orderId,
|
||||
},
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
resolve(res.data)
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: res.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 申请售后
|
||||
* @param {Object} event 事件对象
|
||||
*/
|
||||
orderAfterSales(event) {
|
||||
uni.navigateTo({
|
||||
url: util.setUrl('/pages/shop/order/refundStar', {
|
||||
orderId: event.id,
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 售后订单更新
|
||||
* @param {Object} event 事件对象
|
||||
*/
|
||||
orderupdateRefund: (event) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
api.shop.orderupdateRefund({
|
||||
data: {
|
||||
id: event.orderId,
|
||||
expressName: event.expressName,
|
||||
trackingNumber: event.trackingNumber,
|
||||
},
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
resolve(res.data)
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: res.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 去评价
|
||||
* @param {Object} event 事件对象
|
||||
*/
|
||||
orderComment(event) {
|
||||
uni.navigateTo({
|
||||
url: util.setUrl('/pages/shop/order/evaluate', {
|
||||
orderId: event.id,
|
||||
})
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
export default order
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
<title></title>
|
||||
<!--preload-links-->
|
||||
<!--app-context-->
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"><!--app-html--></div>
|
||||
<script type="module" src="/main.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
import App from './App'
|
||||
// vuex状态管理
|
||||
import store from '@/store';
|
||||
//
|
||||
import Vuex from 'vuex'
|
||||
|
||||
import TIM from '@tencentcloud/chat';
|
||||
|
||||
const chat = TencentCloudChat.create({
|
||||
SDKAppID: 0,
|
||||
})
|
||||
|
||||
// 集成聊天
|
||||
uni.$TIM = TIM
|
||||
// 创建腾讯云im聊天
|
||||
uni.$chat = TIM.create({
|
||||
SDKAppID: util.config.TChat.SDKAppID,
|
||||
})
|
||||
|
||||
// #ifdef VUE3
|
||||
import {
|
||||
createSSRApp
|
||||
} from 'vue'
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
app.use(store)
|
||||
|
||||
return {
|
||||
app,
|
||||
Vuex
|
||||
}
|
||||
}
|
||||
// #endif
|
|
@ -0,0 +1,72 @@
|
|||
{
|
||||
"name" : "service",
|
||||
"appid" : "__UNI__46D8D54",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion" : "3"
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../acorn/bin/acorn" "$@"
|
||||
else
|
||||
exec node "$basedir/../acorn/bin/acorn" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\acorn\bin\acorn" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../browserslist/cli.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../browserslist/cli.js" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\browserslist\cli.js" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../browserslist/cli.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../browserslist/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../browserslist/cli.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../browserslist/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../esprima/bin/esparse.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../esprima/bin/esparse.js" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\esprima\bin\esparse.js" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../esprima/bin/esparse.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../esprima/bin/esparse.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../esprima/bin/esparse.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../esprima/bin/esparse.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../esprima/bin/esvalidate.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../esprima/bin/esvalidate.js" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\esprima\bin\esvalidate.js" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../esprima/bin/esvalidate.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../esprima/bin/esvalidate.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../esprima/bin/esvalidate.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../esprima/bin/esvalidate.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../image-size/bin/image-size.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../image-size/bin/image-size.js" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\image-size\bin\image-size.js" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../image-size/bin/image-size.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../image-size/bin/image-size.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../image-size/bin/image-size.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../image-size/bin/image-size.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../is-docker/cli.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../is-docker/cli.js" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\is-docker\cli.js" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../is-docker/cli.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../is-docker/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../is-docker/cli.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../is-docker/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../js-yaml/bin/js-yaml.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../js-yaml/bin/js-yaml.js" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\js-yaml\bin\js-yaml.js" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../jscodeshift/bin/jscodeshift.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../jscodeshift/bin/jscodeshift.js" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\jscodeshift\bin\jscodeshift.js" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../jscodeshift/bin/jscodeshift.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../jscodeshift/bin/jscodeshift.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../jscodeshift/bin/jscodeshift.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../jscodeshift/bin/jscodeshift.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../jsesc/bin/jsesc" "$@"
|
||||
else
|
||||
exec node "$basedir/../jsesc/bin/jsesc" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\jsesc\bin\jsesc" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../jsesc/bin/jsesc" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../jsesc/bin/jsesc" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../jsesc/bin/jsesc" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../jsesc/bin/jsesc" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../json5/lib/cli.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../json5/lib/cli.js" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\json5\lib\cli.js" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../json5/lib/cli.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../json5/lib/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../loose-envify/cli.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../loose-envify/cli.js" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\loose-envify\cli.js" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../loose-envify/cli.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../loose-envify/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../loose-envify/cli.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../loose-envify/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../metro/src/cli.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../metro/src/cli.js" "$@"
|
||||
fi
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../metro-symbolicate/src/index.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../metro-symbolicate/src/index.js" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\metro-symbolicate\src\index.js" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../metro-symbolicate/src/index.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../metro-symbolicate/src/index.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../metro-symbolicate/src/index.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../metro-symbolicate/src/index.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\metro\src\cli.js" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../metro/src/cli.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../metro/src/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../metro/src/cli.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../metro/src/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../mime/cli.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../mime/cli.js" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mime\cli.js" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../mime/cli.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../mime/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../mime/cli.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../mime/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../mkdirp/bin/cmd.js" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mkdirp\bin\cmd.js" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../@babel/parser/bin/babel-parser.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../@babel/parser/bin/babel-parser.js" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@babel\parser\bin\babel-parser.js" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../chrome-launcher/bin/print-chrome-path.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../chrome-launcher/bin/print-chrome-path.js" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\chrome-launcher\bin\print-chrome-path.js" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../chrome-launcher/bin/print-chrome-path.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../chrome-launcher/bin/print-chrome-path.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../chrome-launcher/bin/print-chrome-path.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../chrome-launcher/bin/print-chrome-path.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../react-native/cli.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../react-native/cli.js" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\react-native\cli.js" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../react-native/cli.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../react-native/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../react-native/cli.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../react-native/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../regjsparser/bin/parser" "$@"
|
||||
else
|
||||
exec node "$basedir/../regjsparser/bin/parser" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\regjsparser\bin\parser" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../regjsparser/bin/parser" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../regjsparser/bin/parser" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../regjsparser/bin/parser" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../regjsparser/bin/parser" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../resolve/bin/resolve" "$@"
|
||||
else
|
||||
exec node "$basedir/../resolve/bin/resolve" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\resolve\bin\resolve" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../resolve/bin/resolve" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../resolve/bin/resolve" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../resolve/bin/resolve" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../resolve/bin/resolve" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../rimraf/bin.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../rimraf/bin.js" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rimraf\bin.js" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../rimraf/bin.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../rimraf/bin.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../semver/bin/semver.js" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../semver/bin/semver.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../semver/bin/semver.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../terser/bin/terser" "$@"
|
||||
else
|
||||
exec node "$basedir/../terser/bin/terser" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\terser\bin\terser" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../terser/bin/terser" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../terser/bin/terser" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../terser/bin/terser" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../terser/bin/terser" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../update-browserslist-db/cli.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../update-browserslist-db/cli.js" "$@"
|
||||
fi
|
|
@ -0,0 +1,17 @@
|
|||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\update-browserslist-db\cli.js" %*
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../update-browserslist-db/cli.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../update-browserslist-db/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../update-browserslist-db/cli.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../update-browserslist-db/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,202 @@
|
|||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -0,0 +1,218 @@
|
|||
# @ampproject/remapping
|
||||
|
||||
> Remap sequential sourcemaps through transformations to point at the original source code
|
||||
|
||||
Remapping allows you to take the sourcemaps generated through transforming your code and "remap"
|
||||
them to the original source locations. Think "my minified code, transformed with babel and bundled
|
||||
with webpack", all pointing to the correct location in your original source code.
|
||||
|
||||
With remapping, none of your source code transformations need to be aware of the input's sourcemap,
|
||||
they only need to generate an output sourcemap. This greatly simplifies building custom
|
||||
transformations (think a find-and-replace).
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install @ampproject/remapping
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```typescript
|
||||
function remapping(
|
||||
map: SourceMap | SourceMap[],
|
||||
loader: (file: string, ctx: LoaderContext) => (SourceMap | null | undefined),
|
||||
options?: { excludeContent: boolean, decodedMappings: boolean }
|
||||
): SourceMap;
|
||||
|
||||
// LoaderContext gives the loader the importing sourcemap, tree depth, the ability to override the
|
||||
// "source" location (where child sources are resolved relative to, or the location of original
|
||||
// source), and the ability to override the "content" of an original source for inclusion in the
|
||||
// output sourcemap.
|
||||
type LoaderContext = {
|
||||
readonly importer: string;
|
||||
readonly depth: number;
|
||||
source: string;
|
||||
content: string | null | undefined;
|
||||
}
|
||||
```
|
||||
|
||||
`remapping` takes the final output sourcemap, and a `loader` function. For every source file pointer
|
||||
in the sourcemap, the `loader` will be called with the resolved path. If the path itself represents
|
||||
a transformed file (it has a sourcmap associated with it), then the `loader` should return that
|
||||
sourcemap. If not, the path will be treated as an original, untransformed source code.
|
||||
|
||||
```js
|
||||
// Babel transformed "helloworld.js" into "transformed.js"
|
||||
const transformedMap = JSON.stringify({
|
||||
file: 'transformed.js',
|
||||
// 1st column of 2nd line of output file translates into the 1st source
|
||||
// file, line 3, column 2
|
||||
mappings: ';CAEE',
|
||||
sources: ['helloworld.js'],
|
||||
version: 3,
|
||||
});
|
||||
|
||||
// Uglify minified "transformed.js" into "transformed.min.js"
|
||||
const minifiedTransformedMap = JSON.stringify({
|
||||
file: 'transformed.min.js',
|
||||
// 0th column of 1st line of output file translates into the 1st source
|
||||
// file, line 2, column 1.
|
||||
mappings: 'AACC',
|
||||
names: [],
|
||||
sources: ['transformed.js'],
|
||||
version: 3,
|
||||
});
|
||||
|
||||
const remapped = remapping(
|
||||
minifiedTransformedMap,
|
||||
(file, ctx) => {
|
||||
|
||||
// The "transformed.js" file is an transformed file.
|
||||
if (file === 'transformed.js') {
|
||||
// The root importer is empty.
|
||||
console.assert(ctx.importer === '');
|
||||
// The depth in the sourcemap tree we're currently loading.
|
||||
// The root `minifiedTransformedMap` is depth 0, and its source children are depth 1, etc.
|
||||
console.assert(ctx.depth === 1);
|
||||
|
||||
return transformedMap;
|
||||
}
|
||||
|
||||
// Loader will be called to load transformedMap's source file pointers as well.
|
||||
console.assert(file === 'helloworld.js');
|
||||
// `transformed.js`'s sourcemap points into `helloworld.js`.
|
||||
console.assert(ctx.importer === 'transformed.js');
|
||||
// This is a source child of `transformed`, which is a source child of `minifiedTransformedMap`.
|
||||
console.assert(ctx.depth === 2);
|
||||
return null;
|
||||
}
|
||||
);
|
||||
|
||||
console.log(remapped);
|
||||
// {
|
||||
// file: 'transpiled.min.js',
|
||||
// mappings: 'AAEE',
|
||||
// sources: ['helloworld.js'],
|
||||
// version: 3,
|
||||
// };
|
||||
```
|
||||
|
||||
In this example, `loader` will be called twice:
|
||||
|
||||
1. `"transformed.js"`, the first source file pointer in the `minifiedTransformedMap`. We return the
|
||||
associated sourcemap for it (its a transformed file, after all) so that sourcemap locations can
|
||||
be traced through it into the source files it represents.
|
||||
2. `"helloworld.js"`, our original, unmodified source code. This file does not have a sourcemap, so
|
||||
we return `null`.
|
||||
|
||||
The `remapped` sourcemap now points from `transformed.min.js` into locations in `helloworld.js`. If
|
||||
you were to read the `mappings`, it says "0th column of the first line output line points to the 1st
|
||||
column of the 2nd line of the file `helloworld.js`".
|
||||
|
||||
### Multiple transformations of a file
|
||||
|
||||
As a convenience, if you have multiple single-source transformations of a file, you may pass an
|
||||
array of sourcemap files in the order of most-recent transformation sourcemap first. Note that this
|
||||
changes the `importer` and `depth` of each call to our loader. So our above example could have been
|
||||
written as:
|
||||
|
||||
```js
|
||||
const remapped = remapping(
|
||||
[minifiedTransformedMap, transformedMap],
|
||||
() => null
|
||||
);
|
||||
|
||||
console.log(remapped);
|
||||
// {
|
||||
// file: 'transpiled.min.js',
|
||||
// mappings: 'AAEE',
|
||||
// sources: ['helloworld.js'],
|
||||
// version: 3,
|
||||
// };
|
||||
```
|
||||
|
||||
### Advanced control of the loading graph
|
||||
|
||||
#### `source`
|
||||
|
||||
The `source` property can overridden to any value to change the location of the current load. Eg,
|
||||
for an original source file, it allows us to change the location to the original source regardless
|
||||
of what the sourcemap source entry says. And for transformed files, it allows us to change the
|
||||
relative resolving location for child sources of the loaded sourcemap.
|
||||
|
||||
```js
|
||||
const remapped = remapping(
|
||||
minifiedTransformedMap,
|
||||
(file, ctx) => {
|
||||
|
||||
if (file === 'transformed.js') {
|
||||
// We pretend the transformed.js file actually exists in the 'src/' directory. When the nested
|
||||
// source files are loaded, they will now be relative to `src/`.
|
||||
ctx.source = 'src/transformed.js';
|
||||
return transformedMap;
|
||||
}
|
||||
|
||||
console.assert(file === 'src/helloworld.js');
|
||||
// We could futher change the source of this original file, eg, to be inside a nested directory
|
||||
// itself. This will be reflected in the remapped sourcemap.
|
||||
ctx.source = 'src/nested/transformed.js';
|
||||
return null;
|
||||
}
|
||||
);
|
||||
|
||||
console.log(remapped);
|
||||
// {
|
||||
// …,
|
||||
// sources: ['src/nested/helloworld.js'],
|
||||
// };
|
||||
```
|
||||
|
||||
|
||||
#### `content`
|
||||
|
||||
The `content` property can be overridden when we encounter an original source file. Eg, this allows
|
||||
you to manually provide the source content of the original file regardless of whether the
|
||||
`sourcesContent` field is present in the parent sourcemap. It can also be set to `null` to remove
|
||||
the source content.
|
||||
|
||||
```js
|
||||
const remapped = remapping(
|
||||
minifiedTransformedMap,
|
||||
(file, ctx) => {
|
||||
|
||||
if (file === 'transformed.js') {
|
||||
// transformedMap does not include a `sourcesContent` field, so usually the remapped sourcemap
|
||||
// would not include any `sourcesContent` values.
|
||||
return transformedMap;
|
||||
}
|
||||
|
||||
console.assert(file === 'helloworld.js');
|
||||
// We can read the file to provide the source content.
|
||||
ctx.content = fs.readFileSync(file, 'utf8');
|
||||
return null;
|
||||
}
|
||||
);
|
||||
|
||||
console.log(remapped);
|
||||
// {
|
||||
// …,
|
||||
// sourcesContent: [
|
||||
// 'console.log("Hello world!")',
|
||||
// ],
|
||||
// };
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
#### excludeContent
|
||||
|
||||
By default, `excludeContent` is `false`. Passing `{ excludeContent: true }` will exclude the
|
||||
`sourcesContent` field from the returned sourcemap. This is mainly useful when you want to reduce
|
||||
the size out the sourcemap.
|
||||
|
||||
#### decodedMappings
|
||||
|
||||
By default, `decodedMappings` is `false`. Passing `{ decodedMappings: true }` will leave the
|
||||
`mappings` field in a [decoded state](https://github.com/rich-harris/sourcemap-codec) instead of
|
||||
encoding into a VLQ string.
|
|
@ -0,0 +1,197 @@
|
|||
import { decodedMappings, traceSegment, TraceMap } from '@jridgewell/trace-mapping';
|
||||
import { GenMapping, maybeAddSegment, setSourceContent, setIgnore, toDecodedMap, toEncodedMap } from '@jridgewell/gen-mapping';
|
||||
|
||||
const SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null, false);
|
||||
const EMPTY_SOURCES = [];
|
||||
function SegmentObject(source, line, column, name, content, ignore) {
|
||||
return { source, line, column, name, content, ignore };
|
||||
}
|
||||
function Source(map, sources, source, content, ignore) {
|
||||
return {
|
||||
map,
|
||||
sources,
|
||||
source,
|
||||
content,
|
||||
ignore,
|
||||
};
|
||||
}
|
||||
/**
|
||||
* MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes
|
||||
* (which may themselves be SourceMapTrees).
|
||||
*/
|
||||
function MapSource(map, sources) {
|
||||
return Source(map, sources, '', null, false);
|
||||
}
|
||||
/**
|
||||
* A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive
|
||||
* segment tracing ends at the `OriginalSource`.
|
||||
*/
|
||||
function OriginalSource(source, content, ignore) {
|
||||
return Source(null, EMPTY_SOURCES, source, content, ignore);
|
||||
}
|
||||
/**
|
||||
* traceMappings is only called on the root level SourceMapTree, and begins the process of
|
||||
* resolving each mapping in terms of the original source files.
|
||||
*/
|
||||
function traceMappings(tree) {
|
||||
// TODO: Eventually support sourceRoot, which has to be removed because the sources are already
|
||||
// fully resolved. We'll need to make sources relative to the sourceRoot before adding them.
|
||||
const gen = new GenMapping({ file: tree.map.file });
|
||||
const { sources: rootSources, map } = tree;
|
||||
const rootNames = map.names;
|
||||
const rootMappings = decodedMappings(map);
|
||||
for (let i = 0; i < rootMappings.length; i++) {
|
||||
const segments = rootMappings[i];
|
||||
for (let j = 0; j < segments.length; j++) {
|
||||
const segment = segments[j];
|
||||
const genCol = segment[0];
|
||||
let traced = SOURCELESS_MAPPING;
|
||||
// 1-length segments only move the current generated column, there's no source information
|
||||
// to gather from it.
|
||||
if (segment.length !== 1) {
|
||||
const source = rootSources[segment[1]];
|
||||
traced = originalPositionFor(source, segment[2], segment[3], segment.length === 5 ? rootNames[segment[4]] : '');
|
||||
// If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a
|
||||
// respective segment into an original source.
|
||||
if (traced == null)
|
||||
continue;
|
||||
}
|
||||
const { column, line, name, content, source, ignore } = traced;
|
||||
maybeAddSegment(gen, i, genCol, source, line, column, name);
|
||||
if (source && content != null)
|
||||
setSourceContent(gen, source, content);
|
||||
if (ignore)
|
||||
setIgnore(gen, source, true);
|
||||
}
|
||||
}
|
||||
return gen;
|
||||
}
|
||||
/**
|
||||
* originalPositionFor is only called on children SourceMapTrees. It recurses down into its own
|
||||
* child SourceMapTrees, until we find the original source map.
|
||||
*/
|
||||
function originalPositionFor(source, line, column, name) {
|
||||
if (!source.map) {
|
||||
return SegmentObject(source.source, line, column, name, source.content, source.ignore);
|
||||
}
|
||||
const segment = traceSegment(source.map, line, column);
|
||||
// If we couldn't find a segment, then this doesn't exist in the sourcemap.
|
||||
if (segment == null)
|
||||
return null;
|
||||
// 1-length segments only move the current generated column, there's no source information
|
||||
// to gather from it.
|
||||
if (segment.length === 1)
|
||||
return SOURCELESS_MAPPING;
|
||||
return originalPositionFor(source.sources[segment[1]], segment[2], segment[3], segment.length === 5 ? source.map.names[segment[4]] : name);
|
||||
}
|
||||
|
||||
function asArray(value) {
|
||||
if (Array.isArray(value))
|
||||
return value;
|
||||
return [value];
|
||||
}
|
||||
/**
|
||||
* Recursively builds a tree structure out of sourcemap files, with each node
|
||||
* being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of
|
||||
* `OriginalSource`s and `SourceMapTree`s.
|
||||
*
|
||||
* Every sourcemap is composed of a collection of source files and mappings
|
||||
* into locations of those source files. When we generate a `SourceMapTree` for
|
||||
* the sourcemap, we attempt to load each source file's own sourcemap. If it
|
||||
* does not have an associated sourcemap, it is considered an original,
|
||||
* unmodified source file.
|
||||
*/
|
||||
function buildSourceMapTree(input, loader) {
|
||||
const maps = asArray(input).map((m) => new TraceMap(m, ''));
|
||||
const map = maps.pop();
|
||||
for (let i = 0; i < maps.length; i++) {
|
||||
if (maps[i].sources.length > 1) {
|
||||
throw new Error(`Transformation map ${i} must have exactly one source file.\n` +
|
||||
'Did you specify these with the most recent transformation maps first?');
|
||||
}
|
||||
}
|
||||
let tree = build(map, loader, '', 0);
|
||||
for (let i = maps.length - 1; i >= 0; i--) {
|
||||
tree = MapSource(maps[i], [tree]);
|
||||
}
|
||||
return tree;
|
||||
}
|
||||
function build(map, loader, importer, importerDepth) {
|
||||
const { resolvedSources, sourcesContent, ignoreList } = map;
|
||||
const depth = importerDepth + 1;
|
||||
const children = resolvedSources.map((sourceFile, i) => {
|
||||
// The loading context gives the loader more information about why this file is being loaded
|
||||
// (eg, from which importer). It also allows the loader to override the location of the loaded
|
||||
// sourcemap/original source, or to override the content in the sourcesContent field if it's
|
||||
// an unmodified source file.
|
||||
const ctx = {
|
||||
importer,
|
||||
depth,
|
||||
source: sourceFile || '',
|
||||
content: undefined,
|
||||
ignore: undefined,
|
||||
};
|
||||
// Use the provided loader callback to retrieve the file's sourcemap.
|
||||
// TODO: We should eventually support async loading of sourcemap files.
|
||||
const sourceMap = loader(ctx.source, ctx);
|
||||
const { source, content, ignore } = ctx;
|
||||
// If there is a sourcemap, then we need to recurse into it to load its source files.
|
||||
if (sourceMap)
|
||||
return build(new TraceMap(sourceMap, source), loader, source, depth);
|
||||
// Else, it's an unmodified source file.
|
||||
// The contents of this unmodified source file can be overridden via the loader context,
|
||||
// allowing it to be explicitly null or a string. If it remains undefined, we fall back to
|
||||
// the importing sourcemap's `sourcesContent` field.
|
||||
const sourceContent = content !== undefined ? content : sourcesContent ? sourcesContent[i] : null;
|
||||
const ignored = ignore !== undefined ? ignore : ignoreList ? ignoreList.includes(i) : false;
|
||||
return OriginalSource(source, sourceContent, ignored);
|
||||
});
|
||||
return MapSource(map, children);
|
||||
}
|
||||
|
||||
/**
|
||||
* A SourceMap v3 compatible sourcemap, which only includes fields that were
|
||||
* provided to it.
|
||||
*/
|
||||
class SourceMap {
|
||||
constructor(map, options) {
|
||||
const out = options.decodedMappings ? toDecodedMap(map) : toEncodedMap(map);
|
||||
this.version = out.version; // SourceMap spec says this should be first.
|
||||
this.file = out.file;
|
||||
this.mappings = out.mappings;
|
||||
this.names = out.names;
|
||||
this.ignoreList = out.ignoreList;
|
||||
this.sourceRoot = out.sourceRoot;
|
||||
this.sources = out.sources;
|
||||
if (!options.excludeContent) {
|
||||
this.sourcesContent = out.sourcesContent;
|
||||
}
|
||||
}
|
||||
toString() {
|
||||
return JSON.stringify(this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Traces through all the mappings in the root sourcemap, through the sources
|
||||
* (and their sourcemaps), all the way back to the original source location.
|
||||
*
|
||||
* `loader` will be called every time we encounter a source file. If it returns
|
||||
* a sourcemap, we will recurse into that sourcemap to continue the trace. If
|
||||
* it returns a falsey value, that source file is treated as an original,
|
||||
* unmodified source file.
|
||||
*
|
||||
* Pass `excludeContent` to exclude any self-containing source file content
|
||||
* from the output sourcemap.
|
||||
*
|
||||
* Pass `decodedMappings` to receive a SourceMap with decoded (instead of
|
||||
* VLQ encoded) mappings.
|
||||
*/
|
||||
function remapping(input, loader, options) {
|
||||
const opts = typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false };
|
||||
const tree = buildSourceMapTree(input, loader);
|
||||
return new SourceMap(traceMappings(tree), opts);
|
||||
}
|
||||
|
||||
export { remapping as default };
|
||||
//# sourceMappingURL=remapping.mjs.map
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,202 @@
|
|||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@jridgewell/trace-mapping'), require('@jridgewell/gen-mapping')) :
|
||||
typeof define === 'function' && define.amd ? define(['@jridgewell/trace-mapping', '@jridgewell/gen-mapping'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.remapping = factory(global.traceMapping, global.genMapping));
|
||||
})(this, (function (traceMapping, genMapping) { 'use strict';
|
||||
|
||||
const SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null, false);
|
||||
const EMPTY_SOURCES = [];
|
||||
function SegmentObject(source, line, column, name, content, ignore) {
|
||||
return { source, line, column, name, content, ignore };
|
||||
}
|
||||
function Source(map, sources, source, content, ignore) {
|
||||
return {
|
||||
map,
|
||||
sources,
|
||||
source,
|
||||
content,
|
||||
ignore,
|
||||
};
|
||||
}
|
||||
/**
|
||||
* MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes
|
||||
* (which may themselves be SourceMapTrees).
|
||||
*/
|
||||
function MapSource(map, sources) {
|
||||
return Source(map, sources, '', null, false);
|
||||
}
|
||||
/**
|
||||
* A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive
|
||||
* segment tracing ends at the `OriginalSource`.
|
||||
*/
|
||||
function OriginalSource(source, content, ignore) {
|
||||
return Source(null, EMPTY_SOURCES, source, content, ignore);
|
||||
}
|
||||
/**
|
||||
* traceMappings is only called on the root level SourceMapTree, and begins the process of
|
||||
* resolving each mapping in terms of the original source files.
|
||||
*/
|
||||
function traceMappings(tree) {
|
||||
// TODO: Eventually support sourceRoot, which has to be removed because the sources are already
|
||||
// fully resolved. We'll need to make sources relative to the sourceRoot before adding them.
|
||||
const gen = new genMapping.GenMapping({ file: tree.map.file });
|
||||
const { sources: rootSources, map } = tree;
|
||||
const rootNames = map.names;
|
||||
const rootMappings = traceMapping.decodedMappings(map);
|
||||
for (let i = 0; i < rootMappings.length; i++) {
|
||||
const segments = rootMappings[i];
|
||||
for (let j = 0; j < segments.length; j++) {
|
||||
const segment = segments[j];
|
||||
const genCol = segment[0];
|
||||
let traced = SOURCELESS_MAPPING;
|
||||
// 1-length segments only move the current generated column, there's no source information
|
||||
// to gather from it.
|
||||
if (segment.length !== 1) {
|
||||
const source = rootSources[segment[1]];
|
||||
traced = originalPositionFor(source, segment[2], segment[3], segment.length === 5 ? rootNames[segment[4]] : '');
|
||||
// If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a
|
||||
// respective segment into an original source.
|
||||
if (traced == null)
|
||||
continue;
|
||||
}
|
||||
const { column, line, name, content, source, ignore } = traced;
|
||||
genMapping.maybeAddSegment(gen, i, genCol, source, line, column, name);
|
||||
if (source && content != null)
|
||||
genMapping.setSourceContent(gen, source, content);
|
||||
if (ignore)
|
||||
genMapping.setIgnore(gen, source, true);
|
||||
}
|
||||
}
|
||||
return gen;
|
||||
}
|
||||
/**
|
||||
* originalPositionFor is only called on children SourceMapTrees. It recurses down into its own
|
||||
* child SourceMapTrees, until we find the original source map.
|
||||
*/
|
||||
function originalPositionFor(source, line, column, name) {
|
||||
if (!source.map) {
|
||||
return SegmentObject(source.source, line, column, name, source.content, source.ignore);
|
||||
}
|
||||
const segment = traceMapping.traceSegment(source.map, line, column);
|
||||
// If we couldn't find a segment, then this doesn't exist in the sourcemap.
|
||||
if (segment == null)
|
||||
return null;
|
||||
// 1-length segments only move the current generated column, there's no source information
|
||||
// to gather from it.
|
||||
if (segment.length === 1)
|
||||
return SOURCELESS_MAPPING;
|
||||
return originalPositionFor(source.sources[segment[1]], segment[2], segment[3], segment.length === 5 ? source.map.names[segment[4]] : name);
|
||||
}
|
||||
|
||||
function asArray(value) {
|
||||
if (Array.isArray(value))
|
||||
return value;
|
||||
return [value];
|
||||
}
|
||||
/**
|
||||
* Recursively builds a tree structure out of sourcemap files, with each node
|
||||
* being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of
|
||||
* `OriginalSource`s and `SourceMapTree`s.
|
||||
*
|
||||
* Every sourcemap is composed of a collection of source files and mappings
|
||||
* into locations of those source files. When we generate a `SourceMapTree` for
|
||||
* the sourcemap, we attempt to load each source file's own sourcemap. If it
|
||||
* does not have an associated sourcemap, it is considered an original,
|
||||
* unmodified source file.
|
||||
*/
|
||||
function buildSourceMapTree(input, loader) {
|
||||
const maps = asArray(input).map((m) => new traceMapping.TraceMap(m, ''));
|
||||
const map = maps.pop();
|
||||
for (let i = 0; i < maps.length; i++) {
|
||||
if (maps[i].sources.length > 1) {
|
||||
throw new Error(`Transformation map ${i} must have exactly one source file.\n` +
|
||||
'Did you specify these with the most recent transformation maps first?');
|
||||
}
|
||||
}
|
||||
let tree = build(map, loader, '', 0);
|
||||
for (let i = maps.length - 1; i >= 0; i--) {
|
||||
tree = MapSource(maps[i], [tree]);
|
||||
}
|
||||
return tree;
|
||||
}
|
||||
function build(map, loader, importer, importerDepth) {
|
||||
const { resolvedSources, sourcesContent, ignoreList } = map;
|
||||
const depth = importerDepth + 1;
|
||||
const children = resolvedSources.map((sourceFile, i) => {
|
||||
// The loading context gives the loader more information about why this file is being loaded
|
||||
// (eg, from which importer). It also allows the loader to override the location of the loaded
|
||||
// sourcemap/original source, or to override the content in the sourcesContent field if it's
|
||||
// an unmodified source file.
|
||||
const ctx = {
|
||||
importer,
|
||||
depth,
|
||||
source: sourceFile || '',
|
||||
content: undefined,
|
||||
ignore: undefined,
|
||||
};
|
||||
// Use the provided loader callback to retrieve the file's sourcemap.
|
||||
// TODO: We should eventually support async loading of sourcemap files.
|
||||
const sourceMap = loader(ctx.source, ctx);
|
||||
const { source, content, ignore } = ctx;
|
||||
// If there is a sourcemap, then we need to recurse into it to load its source files.
|
||||
if (sourceMap)
|
||||
return build(new traceMapping.TraceMap(sourceMap, source), loader, source, depth);
|
||||
// Else, it's an unmodified source file.
|
||||
// The contents of this unmodified source file can be overridden via the loader context,
|
||||
// allowing it to be explicitly null or a string. If it remains undefined, we fall back to
|
||||
// the importing sourcemap's `sourcesContent` field.
|
||||
const sourceContent = content !== undefined ? content : sourcesContent ? sourcesContent[i] : null;
|
||||
const ignored = ignore !== undefined ? ignore : ignoreList ? ignoreList.includes(i) : false;
|
||||
return OriginalSource(source, sourceContent, ignored);
|
||||
});
|
||||
return MapSource(map, children);
|
||||
}
|
||||
|
||||
/**
|
||||
* A SourceMap v3 compatible sourcemap, which only includes fields that were
|
||||
* provided to it.
|
||||
*/
|
||||
class SourceMap {
|
||||
constructor(map, options) {
|
||||
const out = options.decodedMappings ? genMapping.toDecodedMap(map) : genMapping.toEncodedMap(map);
|
||||
this.version = out.version; // SourceMap spec says this should be first.
|
||||
this.file = out.file;
|
||||
this.mappings = out.mappings;
|
||||
this.names = out.names;
|
||||
this.ignoreList = out.ignoreList;
|
||||
this.sourceRoot = out.sourceRoot;
|
||||
this.sources = out.sources;
|
||||
if (!options.excludeContent) {
|
||||
this.sourcesContent = out.sourcesContent;
|
||||
}
|
||||
}
|
||||
toString() {
|
||||
return JSON.stringify(this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Traces through all the mappings in the root sourcemap, through the sources
|
||||
* (and their sourcemaps), all the way back to the original source location.
|
||||
*
|
||||
* `loader` will be called every time we encounter a source file. If it returns
|
||||
* a sourcemap, we will recurse into that sourcemap to continue the trace. If
|
||||
* it returns a falsey value, that source file is treated as an original,
|
||||
* unmodified source file.
|
||||
*
|
||||
* Pass `excludeContent` to exclude any self-containing source file content
|
||||
* from the output sourcemap.
|
||||
*
|
||||
* Pass `decodedMappings` to receive a SourceMap with decoded (instead of
|
||||
* VLQ encoded) mappings.
|
||||
*/
|
||||
function remapping(input, loader, options) {
|
||||
const opts = typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false };
|
||||
const tree = buildSourceMapTree(input, loader);
|
||||
return new SourceMap(traceMappings(tree), opts);
|
||||
}
|
||||
|
||||
return remapping;
|
||||
|
||||
}));
|
||||
//# sourceMappingURL=remapping.umd.js.map
|
1
service/node_modules/@ampproject/remapping/dist/remapping.umd.js.map
generated
vendored
Normal file
1
service/node_modules/@ampproject/remapping/dist/remapping.umd.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
14
service/node_modules/@ampproject/remapping/dist/types/build-source-map-tree.d.ts
generated
vendored
Normal file
14
service/node_modules/@ampproject/remapping/dist/types/build-source-map-tree.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
import type { MapSource as MapSourceType } from './source-map-tree';
|
||||
import type { SourceMapInput, SourceMapLoader } from './types';
|
||||
/**
|
||||
* Recursively builds a tree structure out of sourcemap files, with each node
|
||||
* being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of
|
||||
* `OriginalSource`s and `SourceMapTree`s.
|
||||
*
|
||||
* Every sourcemap is composed of a collection of source files and mappings
|
||||
* into locations of those source files. When we generate a `SourceMapTree` for
|
||||
* the sourcemap, we attempt to load each source file's own sourcemap. If it
|
||||
* does not have an associated sourcemap, it is considered an original,
|
||||
* unmodified source file.
|
||||
*/
|
||||
export default function buildSourceMapTree(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader): MapSourceType;
|
20
service/node_modules/@ampproject/remapping/dist/types/remapping.d.ts
generated
vendored
Normal file
20
service/node_modules/@ampproject/remapping/dist/types/remapping.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
import SourceMap from './source-map';
|
||||
import type { SourceMapInput, SourceMapLoader, Options } from './types';
|
||||
export type { SourceMapSegment, EncodedSourceMap, EncodedSourceMap as RawSourceMap, DecodedSourceMap, SourceMapInput, SourceMapLoader, LoaderContext, Options, } from './types';
|
||||
export type { SourceMap };
|
||||
/**
|
||||
* Traces through all the mappings in the root sourcemap, through the sources
|
||||
* (and their sourcemaps), all the way back to the original source location.
|
||||
*
|
||||
* `loader` will be called every time we encounter a source file. If it returns
|
||||
* a sourcemap, we will recurse into that sourcemap to continue the trace. If
|
||||
* it returns a falsey value, that source file is treated as an original,
|
||||
* unmodified source file.
|
||||
*
|
||||
* Pass `excludeContent` to exclude any self-containing source file content
|
||||
* from the output sourcemap.
|
||||
*
|
||||
* Pass `decodedMappings` to receive a SourceMap with decoded (instead of
|
||||
* VLQ encoded) mappings.
|
||||
*/
|
||||
export default function remapping(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader, options?: boolean | Options): SourceMap;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue